/* Mobile Hybrid Navigation Styles v1.2.2 */

.mobile-fab {
    display: none !important;
}

@media (max-width: 768px) {
    /* Identity Bar (Top Header) */
    .mobile-header {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        position: sticky !important;
        top: 0 !important;
        height: 60px !important;
        width: 100% !important;
        background: var(--bg-sidebar) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        border-bottom: 1px solid var(--border) !important;
        z-index: 2000 !important;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        padding: 0 1rem !important;
    }

    .header--hidden {
        transform: translateY(-100%) !important;
    }

    .mobile-header-actions {
        display: flex !important;
        gap: 0.5rem !important;
        align-items: center !important;
    }

    .mobile-action-btn {
        min-width: 48px !important;
        min-height: 48px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        color: var(--text-secondary) !important;
        text-decoration: none !important;
        font-size: 1.25rem !important;
    }

    /* Action Bar (Bottom Navigation) */
    .bottom-nav {
        display: flex !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: 60px !important;
        background: var(--bg-sidebar) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        border-top: 1px solid var(--border) !important;
        z-index: 10000 !important;
        padding: 0 !important;
        margin: 0 !important;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05) !important;
        align-items: center !important;
        justify-content: space-around !important;
    }

    .bottom-nav-link {
        flex: 1 !important;
        height: 60px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        position: relative !important;
        text-decoration: none !important;
        color: var(--text-muted) !important;
        transition: all 0.2s ease !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .bottom-nav-link i {
        font-size: 1.6rem !important;
        width: 1em !important;
        height: 1em !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        line-height: 1 !important;
        margin: 0 !important;
        padding: 0 !important;
        vertical-align: middle !important;
    }

    .bottom-nav-link i.fa-plus {
        transform: translateY(2px) !important;
    }

    .bottom-nav-link span {
        display: none !important;
    }

    .bottom-nav-link.active {
        color: var(--leylek-accent) !important;
    }

    .bottom-nav-link.create-btn {
        transform: none !important;
    }

    /* Content Adjustment */
    .main-content {
        padding-top: 75px !important;
        padding-bottom: calc(80px + env(safe-area-inset-bottom)) !important;
        margin-top: 0 !important;
    }

    /* Ensure profile edit header tabs sit below the fixed mobile header */
    .profile-settings-wrapper,
    .profile-edit-menu-col-wrapper {
        scroll-margin-top: 70px !important;
    }

    /* Profile Page Mobile Redesign - Premium & Clean */
    .profile-owner-controls, #profile-owner-controls-bar {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    .profile-header-container {
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
        margin-bottom: 0.5rem !important;
        background: var(--bg-card) !important;
        overflow: visible !important;
    }

    /* Remove top accent/transition on mobile */
    .profile-header-container > .profile-header-accent,
    .profile-header-container > div:first-child {
        height: 0 !important;
        display: none !important;
        visibility: hidden !important;
    }

    .profile-header-body {
        margin-top: 0 !important;
    }

    .profile-header-inner {
        display: grid !important;
        grid-template-columns: 90px 1fr !important;
        grid-template-areas: "avatar info" !important;
        gap: 1.5rem !important;
        align-items: center !important;
        width: 100% !important;
        padding: 7rem 1rem 2rem 1rem !important; /* Pushed down significantly */
        margin: 0 !important;
        position: relative !important;
        align-items: flex-start !important;
    }

    .profile-avatar-wrapper {
        grid-area: avatar !important;
        width: 90px !important;
        z-index: 10 !important;
    }

    .profile-header-content {
        grid-area: info !important;
        padding-top: 0 !important;
        z-index: 5 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 0.25rem !important;
    }

    .profile-name-section {
        display: flex !important;
        flex-direction: column !important;
        gap: 2px !important;
    }

    .profile-name-section h1 {
        font-size: 1.4rem !important;
        font-weight: 900 !important;
        margin: 0 !important;
    }

    .profile-top-right-meta {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: 0 !important;
    }

    .profile-actions-wrapper, .mobile-owner-actions {
        position: absolute !important;
        top: 25px !important;
        right: 20px !important;
        z-index: 99999 !important;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    #profile-menu-trigger, .mobile-edit-btn {
        width: 44px !important;
        height: 44px !important;
        border-radius: 12px !important;
        background: #ffffff !important;
        border: 2px solid var(--leylek-accent) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-shadow: 0 4px 15px rgba(0,0,0,0.2) !important;
        color: var(--leylek-accent) !important;
    }

    .profile-stats-row {
        position: absolute !important;
        top: 25px !important;
        left: 20px !important;
        width: auto !important;
        background: transparent !important;
        border: none !important;
    }

    .actions-v9-bottom-row {
        display: none !important;
    }

    #icons-v9-bottom-row {
        display: none !important;
    }

    .desktop-avatar-icons {
        display: flex !important;
        gap: 0.5rem !important;
        margin-top: 0.5rem !important;
    }

    .profile-stats-row {
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
        gap: 1rem !important;
    }

    .profile-stats-row span {
        font-size: 1rem !important;
        font-weight: 800 !important;
    }

    .profile-stats-row i {
        font-size: 0.75rem !important;
        opacity: 0.6 !important;
    }

    .profile-stats-row {
        width: 100% !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: flex-start !important;
        gap: 1.25rem !important;
        padding: 0.5rem 0 !important;
        margin-top: 0.25rem !important;
        background: transparent !important;
        border: none !important;
    }

    .profile-stats-row span {
        font-size: 0.95rem !important;
    }

    .profile-stats-row i {
        font-size: 0.7rem !important;
    }

    .profile-info-grid {
        gap: 1rem !important;
        padding: 1rem 1rem !important;
        margin-top: -1rem !important;
    }

    .profile-info-grid .glass-card {
        padding: 1.25rem !important;
    }

    .profile-info-grid section, .profile-info-grid > div {
        width: 100% !important;
    }

    .profile-info-grid .glass-card {
        padding: 1.5rem !important;
        border-radius: 16px !important;
    }

    .profile-info-grid .profile-section-title {
        margin-bottom: 0.75rem !important;
        text-align: center !important;
    }

    .profile-info-grid .text-mono {
        text-align: left !important;
        margin-bottom: 0 !important;
    }

    .profile-bio-text {
        font-size: 1.05rem !important;
        line-height: 1.6 !important;
    }

    .profile-personal-details {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 1.5rem !important;
        text-align: center !important;
    }

    .profile-personal-details div {
        background: rgba(0,0,0,0.02) !important;
        padding: 1rem !important;
        border-radius: 12px !important;
        border: 1px solid var(--border) !important;
    }

    /* Hide desktop-only elements */
    .sidebar, .sidebar-spacer, .right-sidebar, .right-sidebar-spacer, .sidebar-toggle, #sidebar-toggle {
        display: none !important;
        visibility: hidden !important;
    }

    /* Global UI Tweaks */
    .post-card {
        padding: 1.25rem 1rem 0.625rem 1rem !important;
        border-radius: 0 !important;
        margin-bottom: 0 !important;
    }

    .post-content-wrap, .comment-content-wrap {
        font-size: 12px !important;
    }
    
    .logo-text {
        font-size: 1.3rem !important;
    }

    /* Hanging New Post Button (Twitter-style FAB) */
    .mobile-fab {
        display: flex !important;
        position: fixed !important;
        bottom: calc(80px + env(safe-area-inset-bottom)) !important;
        right: 20px !important;
        width: 56px !important;
        height: 56px !important;
        background-color: #1d9bf0 !important; /* Twitter Blue */
        color: white !important;
        border-radius: 50% !important;
        align-items: center !important;
        justify-content: center !important;
        box-shadow: 0 8px 24px rgba(29, 155, 240, 0.4) !important;
        z-index: 9999 !important;
        text-decoration: none !important;
        transition: transform 0.2s ease, background-color 0.2s ease !important;
    }
    .mobile-fab:active {
        transform: scale(0.95) !important;
        background-color: #1a8cd8 !important;
    }
    .mobile-fab i {
        font-size: 1.5rem !important;
        color: white !important;
    }
}

/* --- Public Holidays Tab Styles --- */
.holiday-tab-content {
    animation: fadeIn 0.3s ease;
}

.year-selector {
    display: flex;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 1.5rem;
    width: fit-content;
}


@media (max-width: 1024px) {
    .year-selector {
        width: 100%;
    }
    .year-btn {
        flex: 1;
    }
    .holiday-item {
        padding: 0.85rem;
    }

    /* Profile entry from Kesfet UX overrides */
    .profile-from-kesfet .main-content {
        padding-top: 0px !important;
        padding: 0px 0.5rem 1rem 0.5rem !important;
    }
    .profile-from-kesfet .profile-header-container {
        margin-top: 0px !important;
    }
}

/* Google Auth Button mobile optimization */
@media (max-width: 768px) {
    .btn-google-auth {
        height: 52px !important; /* Ensure min-height 48px tap target */
        font-size: 0.95rem !important;
        padding: 0 1rem !important;
    }
}

/* Registration choice flow optimization */
.btn-email-outline {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 50px;
    background: transparent;
    border: 2px solid var(--accent, #333333);
    border-radius: 0.75rem;
    color: var(--accent, #333333);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    box-sizing: border-box;
    transition: all 0.2s ease-in-out;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.btn-email-outline:hover:not(:disabled) {
    background: var(--accent-light, rgba(0, 0, 0, 0.05));
}
.btn-google-auth:disabled,
.btn-email-outline:disabled {
    opacity: 0.35 !important;
    cursor: not-allowed !important;
}

@media (max-width: 768px) {
    .signup-outer {
        max-width: 480px !important;
        width: 100%;
        margin: 1.5rem auto !important;
        padding: 0 1rem;
    }
    .signup-card {
        padding: 2rem 1.5rem !important;
    }
    #signup-choice-step {
        gap: 1rem !important;
    }
    .btn-google-auth,
    .btn-email-outline {
        height: 52px !important;
        padding: 0 1.25rem !important;
        font-size: 0.95rem !important;
    }
}


