/**
 * Jaluse Stiilid - ELEGANTSED HALL/VALGE TOONID
 * Mobile Action Bar elegantse halli/valge disainiga
 * Asukoht: public_html/paavik/assets/css/footer.css
 */

/* ================================================================
   FOOTER MAIN STRUCTURE
   ================================================================ */
.footer {
    background: linear-gradient(135deg, hsl(210, 15%, 8%) 0%, hsl(210, 20%, 12%) 100%);
    color: hsl(210, 10%, 85%);
    margin-top: auto;
    border-top: 1px solid hsl(210, 20%, 20%);
}

.footer-content {
    padding: var(--space-8) 0;
}

/* ================================================================
   FOOTER GRID LAYOUT
   ================================================================ */
.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
    margin-bottom: var(--space-6);
}

@media (min-width: 640px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr;
        gap: var(--space-8);
    }
}

/* ================================================================
   FOOTER SECTIONS
   ================================================================ */
.footer-section {
    display: flex;
    flex-direction: column;
}

.footer-heading {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    color: white;
    margin-bottom: var(--space-3);
    position: relative;
    padding-bottom: var(--space-2);
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, #6b7280, #9ca3af);
    border-radius: 1px;
}

/* ================================================================
   FOOTER BRAND
   ================================================================ */
.footer-brand {
    margin-bottom: var(--space-6);
}

.footer-brand-text {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: white;
    display: block;
    margin-bottom: var(--space-2);
}

.footer-description {
    color: hsl(210, 10%, 70%);
    line-height: var(--line-height-relaxed);
    max-width: 400px;
    font-size: var(--font-size-sm);
}

/* ================================================================
   FOOTER LINKS
   ================================================================ */
.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.footer-links a {
    color: hsl(210, 10%, 75%);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: var(--font-size-sm);
    padding: var(--space-1) 0;
}

.footer-links a:hover {
    color: #9ca3af;
    transform: translateX(4px);
}

/* ================================================================
   LANGUAGE SELECTOR (Footer)
   ================================================================ */
.footer-language {
    position: relative;
}

.language-selector {
    position: relative;
    display: inline-block;
}

.language-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: hsl(210, 15%, 15%);
    border: 1px solid hsl(210, 15%, 25%);
    border-radius: var(--radius);
    color: hsl(210, 10%, 75%);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: var(--font-size-sm);
    font-family: inherit;
}

.language-toggle:hover {
    background: hsl(210, 15%, 20%);
    border-color: hsl(210, 15%, 30%);
    color: white;
}

.language-menu {
    position: absolute;
    bottom: 100%;
    left: 0;
    min-width: 140px;
    background: white;
    border: 1px solid hsl(210, 15%, 85%);
    border-radius: var(--radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    z-index: 100;
    overflow: hidden;
    margin-bottom: var(--space-2);
}

.language-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3);
    color: hsl(210, 20%, 40%);
    text-decoration: none;
    transition: background-color 0.2s ease;
    font-size: var(--font-size-sm);
}

.language-option:hover {
    background: hsl(210, 15%, 95%);
}

.language-option.active {
    background: hsl(210, 100%, 95%);
    color: hsl(210, 100%, 50%);
    font-weight: var(--font-weight-semibold);
}

/* ================================================================
   FOOTER BOTTOM
   ================================================================ */
.footer-bottom {
    border-top: 1px solid hsl(210, 20%, 20%);
    padding-top: var(--space-4);
    margin-top: var(--space-6);
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-4);
    font-size: var(--font-size-sm);
    color: hsl(210, 10%, 60%);
}

.footer-copyright {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.footer-admin-links a {
    color: #f59e0b;
    text-decoration: none;
    font-weight: var(--font-weight-medium);
}

.footer-admin-links a:hover {
    color: #fbbf24;
}

.footer-version {
    color: hsl(210, 10%, 50%);
    font-size: var(--font-size-xs);
}

/* ================================================================
   DEBUG INFO (Development only)
   ================================================================ */
.debug-info {
    background: hsl(0, 0%, 5%);
    border: 1px solid hsl(0, 0%, 20%);
    border-radius: var(--radius);
    padding: var(--space-3);
    font-family: monospace;
}

.debug-stats {
    color: hsl(120, 50%, 70%);
    font-size: var(--font-size-xs);
    line-height: 1.4;
}

/* ================================================================
   MOBILE ACTION BAR - ELEGANTSED HALL/VALGE TOONID
   ================================================================ */
.mobile-action-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.06);
    z-index: 1000;
    height: 70px;
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: space-around;
    padding: 0 16px;
}

@media (max-width: 767px) {
    .mobile-action-bar {
        display: flex;
    }
    
    body.logged-in {
        padding-bottom: 70px; /* Make room for the bar */
    }
}

.mobile-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 12px;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    border-radius: 12px;
    min-width: 60px;
    height: 54px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
}

.mobile-action:hover {
    background: rgba(0, 0, 0, 0.04);
    color: #374151;
}

.mobile-action.active {
    color: #1f2937;
    background: rgba(0, 0, 0, 0.06);
    font-weight: 600;
}

/* Featured Center Button (Plus) - ELEGANTNE HALL */
.mobile-action.featured {
    background: #374151;
    color: white;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    min-width: 56px;
    box-shadow: 0 4px 12px rgba(55, 65, 81, 0.25);
    transform: translateY(-2px);
    font-size: 24px;
}

.mobile-action.featured:hover {
    background: #1f2937;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(55, 65, 81, 0.35);
}

.mobile-action.featured .action-text {
    display: none;
}

/* Action Icons - Clean SVG styling */
.action-icon {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: all 0.2s ease;
}

.mobile-action.featured .action-icon {
    width: 28px;
    height: 28px;
    stroke-width: 2.5;
}

.action-text {
    line-height: 1.2;
    white-space: nowrap;
    font-size: 11px;
    font-weight: 500;
}

/* Mobile menu toggle button */
.mobile-menu-toggle {
    border: none;
    background: transparent;
    font-family: inherit;
}

/* ================================================================
   MOBILE NAVIGATION MENU - HALL/VALGE DISAIN
   ================================================================ */
.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.mobile-nav.show {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.mobile-nav-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    cursor: pointer;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.mobile-nav-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 320px;
    height: 100vh;
    background: white;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.mobile-nav.show .mobile-nav-content {
    transform: translateX(0);
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-2) 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: var(--space-2);
}

.mobile-nav-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: #1f2937;
    margin: 0;
}

.mobile-nav-close {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6b7280;
}

.mobile-nav-close:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #374151;
    transform: scale(1.05);
}

.mobile-nav-close svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.mobile-user-info {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    background: rgba(0, 0, 0, 0.02);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.user-avatar.large {
    width: 40px;
    height: 40px;
    font-size: var(--font-size-base);
    background: rgba(0, 0, 0, 0.06);
    border: 2px solid rgba(0, 0, 0, 0.08);
    color: #374151;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: var(--font-weight-semibold);
}

.user-info {
    flex: 1;
    text-align: left;
    min-width: 0;
}

.user-name {
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-sm);
    line-height: 1.2;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #1f2937;
}

.user-email {
    font-size: var(--font-size-xs);
    color: #6b7280;
    line-height: 1;
    display: block;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-nav-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-2);
    color: #6b7280;
    text-decoration: none;
    border-radius: var(--radius-lg);
    transition: all 0.2s ease;
    font-weight: var(--font-weight-medium);
    border: none;
    background: transparent;
    cursor: pointer;
    width: 100%;
    font-family: inherit;
    font-size: var(--font-size-sm);
}

.mobile-nav-item:hover {
    background: rgba(0, 0, 0, 0.04);
    color: #374151;
    transform: translateX(4px);
}

.mobile-nav-item.active {
    background: rgba(0, 0, 0, 0.06);
    color: #1f2937;
    font-weight: var(--font-weight-semibold);
}

.mobile-nav-item.logout-item {
    color: #ef4444;
}

.mobile-nav-item.logout-item:hover {
    background: rgba(239, 68, 68, 0.06);
    color: #dc2626;
}

/* Mobile Navigation Menu Icons */
.nav-icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.nav-text {
    flex: 1;
}

.mobile-nav-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.06);
    margin: var(--space-2) 0;
}

/* KEELEVAHETAJA EEMALDATUD - nüüd headeris
.mobile-lang-switcher stiilid eemaldatud */

/* ================================================================
   RESPONSIVE DESIGN
   ================================================================ */
@media (max-width: 767px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: var(--space-2);
    }
    
    .footer-copyright {
        flex-direction: column;
        gap: var(--space-1);
    }
}

@media (max-width: 480px) {
    .footer {
        padding: var(--space-6) 0 var(--space-3);
    }
    
    .footer-content {
        gap: var(--space-4);
    }
}

@media (max-width: 320px) {
    .mobile-action-bar {
        padding: 0 8px;
    }
    
    .mobile-action {
        min-width: 50px;
        padding: 6px 8px;
        font-size: 10px;
    }
    
    .action-icon {
        width: 20px;
        height: 20px;
    }
    
    .mobile-action.featured {
        width: 50px;
        height: 50px;
        min-width: 50px;
    }
    
    .mobile-action.featured .action-icon {
        width: 24px;
        height: 24px;
    }
}

/* ================================================================
   ACCESSIBILITY & KEYBOARD NAVIGATION
   ================================================================ */
.mobile-action:focus,
.mobile-nav-item:focus,
.mobile-nav-close:focus {
    outline: 2px solid #6b7280;
    outline-offset: 2px;
}

/* Prevent body scroll when mobile nav is open */
.mobile-nav-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* ================================================================
   PRINT STYLES
   ================================================================ */
@media print {
    .mobile-action-bar,
    .mobile-nav,
    .debug-info {
        display: none !important;
    }
    
    body.logged-in {
        padding-bottom: 0 !important;
    }
    
    .footer {
        background: white !important;
        color: black !important;
        border-top: 1px solid #ccc !important;
    }
    
    .footer-brand-text {
        color: black !important;
    }
}