/* Share Header Component Styles - Based on header.css but adapted for public sharing */

/* Body padding for fixed header - initial values, will be overridden by JavaScript */
body {
    padding-top: 250px; /* Fallback without !important so JS can override */
}

@media (max-width: 768px) {
    body {
        padding-top: 280px; /* Tablet fallback */
    }
}

@media (max-width: 576px) {
    body {
        padding-top: 300px; /* Mobile fallback */
    }
}

/* Loading state styles */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.65;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 1rem;
    height: 1rem;
    top: calc(50% - 0.5rem);
    right: 0.5rem;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-right-color: transparent;
    border-radius: 50%;
    animation: button-loading-spinner 0.75s linear infinite;
}

@keyframes button-loading-spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Shared Board Edition Typography */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200&display=swap');
.learner-edition {
    font-family: 'Inter', sans-serif;
    font-weight: 200;
    font-size: 0.35em;
    margin-top: 1px;
    letter-spacing: 0.35em;
    text-transform: uppercase;
}

/* Header Logo Styles (same as dashboard) */
#header-logo-link {
    font-size: 2.2rem !important; 
    font-weight: 600 !important;
    color: transparent !important;
    text-transform: none !important; 
    letter-spacing: 0.5px !important;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.95) 0%,
        var(--bs-primary) 100%
    ) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    text-shadow: 0 0 20px rgba(var(--bs-primary-rgb), 0.3) !important;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

#header-logo-link:hover {
    background: linear-gradient(
        180deg,
        #ffffff 0%,
        var(--bs-primary) 85%
    ) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    text-shadow: 0 0 25px rgba(var(--bs-primary-rgb), 0.5) !important;
    transform: scale(1.02);
}

/* Flex alignment for logo container */
.d-flex.align-items-center {
    align-items: center;
}

.logo-container-flex {
    display: flex;
    align-items: center;
    gap: 10px; 
    justify-content: center; 
    padding-left: 3px;
}

.logo-text-block {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 0.25em;
}

/* Share Header Button Styles */
.btn-outline-light {
    opacity: 0.9;
}

.btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    border-color: #fff !important;
    opacity: 0.9;
}

.btn-outline-secondary {
    border-color: rgba(255, 255, 255, 0.75);
    color: rgba(255, 255, 255, 0.75);
}

.btn-outline-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.75) !important;
    color: rgba(255, 255, 255, 0.75) !important;
}

.btn-success {
    opacity: 0.9;
}

.btn-primary {
    opacity: 0.9;
}

/* Share-specific button styling */
#like-button {
    transition: all 0.2s ease;
}

#like-button.liked {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: white !important;
}

#like-button.liked:hover {
    background-color: #c82333 !important;
    border-color: #bd2130 !important;
}

#try-board-button {
    font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    .header-mobile-text {
        display: inline !important;
    }
    
    .header-desktop-text, .header-medium-text {
        display: none !important;
    }
    
    .btn {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    
    .share-action-buttons {
        gap: 0.5rem;
    }
}

@media (min-width: 768px) and (max-width: 1279.98px) {
    .header-mobile-text, .header-desktop-text {
        display: none !important;
    }
    .header-medium-text {
        display: inline !important;
        font-size: 1.1rem;
    }
}

@media (min-width: 1280px) {
    .header-mobile-text, .header-medium-text {
        display: none !important;
    }
    .header-desktop-text {
        display: inline !important;
        font-size: 1.1rem;
    }
    header .d-flex.gap-2 {
        margin-top: -0.5rem;
    }
}

/* Small screen adjustments */
@media (max-width: 375px) {
    .header-mobile-text,
    .header-medium-text,
    .header-desktop-text {
        display: none !important;
    }
    
    .btn i {
        margin-right: 0 !important;
    }
    
    .btn {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    
    /* Reduce header container padding for very small screens */
    .header-container-padding {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    /* Adjust logo container for better spacing */
    .logo-container-flex {
        gap: 8px !important;
        padding-left: 0 !important;
    }
    
    /* Optimize logo text for very small screens */
    #header-logo-link {
        font-size: 1.8rem !important;
        position: relative;
        top: 2px !important;
    }
}

/* Theme toggle styles (hidden for public view) */
.theme-toggle-container small {
    transition: opacity 0.3s;
}

.theme-toggle-container small.active {
    opacity: 1;
    font-weight: 500;
}

.theme-toggle-container small:not(.active) {
    opacity: 0.7;
}

/* Header button positioning */
header .btn > i,
header .btn > svg,
header .btn > span,
header .btn > small {
    position: relative;
    top: 0px;
}

@media (max-width: 767.98px) {
    header .btn:not(#try-board-button) > i,
    header .btn:not(#try-board-button) > svg {
        top: 0;
    }
}
