﻿/* ==================================================
                   PROFESSIONAL LAYOUT STYLES - Baijnath Panchang Theme
                   ================================================== */

/* ==================================================
                   MAUI - PREMIUM MOBILE LAYOUT
                   ================================================== */
.maui-shell,
.web-shell {
    --bp-shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bp-bg);
}

.maui-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--bp-primary-dark) !important;
    background-image: none !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.maui-menu-btn {
    background: transparent;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    transition: var(--bp-transition);
}

    .maui-menu-btn span {
        width: 20px;
        height: 2px;
        background: white;
        border-radius: 2px;
        transition: var(--bp-transition);
    }


    .maui-menu-btn:hover {
        background: transparent;
        opacity: 0.8;
    }

.maui-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.maui-brand-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.maui-brand-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: white; /* White text */
    letter-spacing: 0.5px;
}

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

/* ✅ MAUI Login/Profile Buttons */
.maui-login-btn, .maui-profile-btn {
    background: rgba(229, 192, 104, 0.15);
    border: 1px solid var(--bp-gold);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--bp-transition);
    color: var(--bp-gold);
    font-size: 1.1rem;
}

    .maui-login-btn:hover, .maui-profile-btn:hover {
        background: var(--bp-gold);
        color: var(--bp-primary-dark);
        transform: scale(1.05);
    }

/* MAUI Drawer */
.maui-drawer {
    position: fixed;
    top: 0;
    left: -320px;
    width: 320px;
    max-width: 85%;
    height: 100vh;
    background: linear-gradient(180deg, var(--bp-primary-dark) 0%, #2a1208 100%);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 30px rgba(0,0,0,0.3);
    border-right: 1px solid rgba(229,192,104,0.2);
}

.maui-drawer--open {
    left: 0;
}

.maui-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(229,192,104,0.2);
}

.maui-user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.maui-user-avatar {
    width: 50px;
    height: 50px;
    background: rgba(229,192,104,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--bp-gold);
}

.maui-user-details {
    flex: 1;
}

.maui-user-name {
    font-weight: 700;
    color: white;
    margin-bottom: 0.25rem;
}

.maui-user-email {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.7);
}

.maui-close-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--bp-transition);
}

    .maui-close-btn:hover {
        background: rgba(255,255,255,0.2);
        transform: rotate(90deg);
    }

.maui-drawer-nav {
    flex: 1;
    padding: 0.5rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    overflow-y: auto;
}

.maui-nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.7rem 1rem;
    border-radius: var(--bp-radius-sm);
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    transition: background-color 0.1s ease, color 0.1s ease;
}

    .maui-nav-item i {
        width: 24px;
        font-size: 1.2rem;
    }

    .maui-nav-item:hover {
        background: rgba(229,192,104,0.15);
        color: var(--bp-gold);
    }

    .maui-nav-item.active {
        background: rgba(229,192,104,0.2);
        color: var(--bp-gold);
        border-right: 3px solid var(--bp-gold);
    }

.maui-nav-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(229,192,104,0.3), transparent);
    margin: 0.75rem 1rem;
}

/* ✅ MAUI Drawer Login Button */
.maui-login-drawer-btn {
    background: rgba(229, 192, 104, 0.15);
    border: 1px solid var(--bp-gold);
    border-radius: var(--bp-radius-sm);
    margin-top: 0.5rem;
}

    .maui-login-drawer-btn:hover {
        background: var(--bp-gold);
        color: var(--bp-primary-dark);
    }

.maui-drawer-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(229,192,104,0.1);
}

.maui-footer-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.5);
}

.maui-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 1999;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.maui-content {
    flex: 1;
    padding: 1rem;
    background: var(--bp-bg);
}

/* ==================================================
                   WEB - PROFESSIONAL DESKTOP LAYOUT
                   ================================================== */
/* Web Mobile Header (hidden on desktop) */
.web-mobile-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, var(--bp-primary-dark) 0%, var(--bp-primary) 100%);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.web-mobile-menu-btn {
    background: rgba(255,255,255,0.15);
    border: none;
    border-radius: var(--bp-radius-sm);
    padding: 0.5rem;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

    .web-mobile-menu-btn span {
        width: 20px;
        height: 2px;
        background: white;
        border-radius: 2px;
    }

.web-mobile-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.web-mobile-brand-icon {
    font-size: 1.5rem;
}

.web-mobile-brand-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
}

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

/* ✅ Web Mobile Login/Profile Buttons */
.web-mobile-login-btn, .web-mobile-profile-btn {
    background: rgba(229, 192, 104, 0.15);
    border: 1px solid var(--bp-gold);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--bp-transition);
    color: var(--bp-gold);
    font-size: 1.1rem;
}

    .web-mobile-login-btn:hover, .web-mobile-profile-btn:hover {
        background: var(--bp-gold);
        color: var(--bp-primary-dark);
        transform: scale(1.05);
    }

/* Web Mobile Drawer */
.web-mobile-drawer {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    max-width: 85%;
    height: 100vh;
    background: linear-gradient(180deg, var(--bp-primary-dark) 0%, #2a1208 100%);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 30px rgba(0,0,0,0.3);
}

.web-mobile-drawer--open {
    left: 0;
}

.web-mobile-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(229,192,104,0.2);
}

.web-mobile-user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.web-mobile-user-avatar {
    width: 50px;
    height: 50px;
    background: rgba(229,192,104,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--bp-gold);
}

.web-mobile-user-name {
    font-weight: 700;
    color: white;
}

.web-mobile-user-email {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.7);
}

.web-mobile-close-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.web-mobile-drawer-nav {
    flex: 1;
    padding: 1rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    overflow-y: auto;
}

.web-mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.7rem 1rem;
    border-radius: var(--bp-radius-sm);
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    transition: background-color 0.1s ease, color 0.1s ease;
}

    .web-mobile-nav-item i {
        width: 24px;
        font-size: 1.2rem;
    }

    .web-mobile-nav-item:hover {
        background: rgba(229,192,104,0.15);
        color: var(--bp-gold);
    }

    .web-mobile-nav-item.active {
        background: rgba(229,192,104,0.2);
        color: var(--bp-gold);
    }

.web-mobile-nav-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(229,192,104,0.3), transparent);
    margin: 0.5rem 1rem;
}

/* ✅ Web Mobile Drawer Login Button */
.web-mobile-login-drawer-btn {
    background: rgba(229, 192, 104, 0.15);
    border: 1px solid var(--bp-gold);
    border-radius: var(--bp-radius-sm);
    margin-top: 0.5rem;
}

    .web-mobile-login-drawer-btn:hover {
        background: var(--bp-gold);
        color: var(--bp-primary-dark);
    }

.web-mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 1999;
    animation: fadeIn 0.3s ease;
}

/* Web Content */
.web-content {
    flex: 1 !important;
    padding: 2rem !important;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    background: white !important;
}

/* ==================================================
                   RESPONSIVE DESIGN
                   ================================================== */
@media (max-width: 992px) {
    .web-shell .bp-main-header {
        display: block;
    }

    .web-shell .web-mobile-header {
        display: flex;
    }

    .web-content {
        padding: 1rem;
    }
}

@media (min-width: 993px) {
    .web-shell .bp-main-header {
        display: block;
    }

    .web-shell .web-mobile-header {
        display: none;
    }

    .web-mobile-drawer,
    .web-mobile-overlay {
        display: none;
    }
}

@media (max-width: 480px) {
    .maui-brand-text {
        font-size: 0.9rem;
    }

    .maui-brand-icon {
        font-size: 1.2rem;
    }

    .maui-drawer {
        width: 280px;
    }

    .web-mobile-drawer {
        width: 280px;
    }
}

/* ==========================
               APP DOWNLOAD POPUP
            ========================== */

.bp-app-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.bp-app-popup {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,.25);
}

.bp-app-popup-icon {
    font-size: 52px;
    color: #34A853;
    margin-bottom: 10px;
}

.bp-app-popup h3 {
    margin-bottom: 10px;
    color: #222;
}

.bp-app-popup p {
    color: #666;
    margin-bottom: 20px;
}

.bp-app-popup-buttons {
    display: flex;
    gap: 10px;
}

    .bp-app-popup-buttons button {
        flex: 1;
        border: none;
        border-radius: 10px;
        padding: 12px;
        cursor: pointer;
        font-weight: 600;
    }

.bp-app-yes-btn {
    background: #34A853;
    color: white;
}

.bp-app-no-btn {
    background: #e5e5e5;
    color: #333;
}
/* ==================================================
           CONSOLIDATED RESPONSIVE HEADER FIX
           Applies to MAUI app and Web mobile header
           ================================================== */

.maui-shell,
.no-copy,
.maui-content {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
}

.maui-content {
    padding-bottom: 80px;
}

.maui-header,
.web-mobile-header {
    align-items: center;
    justify-content: space-between;
    gap: 3px;
    padding-left: 6px;
    padding-right: 6px;
    min-width: 0;
    width: 100%;
}

.maui-header {
    padding-top: calc(env(safe-area-inset-top, 0px) + 0.4rem);
    padding-bottom: 0.4rem;
}

.maui-menu-btn,
.web-mobile-menu-btn {
    flex: 0 0 34px;
    width: 34px;
    height: 36px;
    padding: 0.25rem;
}

    .maui-menu-btn span,
    .web-mobile-menu-btn span {
        width: 16px;
    }

.maui-brand,
.web-mobile-brand {
    flex: 1 1 0%;
    min-width: 0;
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    overflow: visible;
    gap: 0;
}

.maui-brand-text,
.web-mobile-brand-text {
    display: block;
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
    width: auto;
    color: #fff;
    font-size: clamp(13px, 4.2vw, 18px) !important;
    font-weight: 600;
    letter-spacing: 0 !important;
    line-height: 1.2;
    white-space: nowrap;
    overflow: visible !important;
    text-overflow: clip !important;
}

.maui-header-actions,
.web-mobile-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
    min-width: 0;
    gap: 2px !important;
}

.maui-home-btn,
.web-mobile-home-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 26px;
    width: 26px;
    min-width: 26px;
    height: 32px;
    padding: 0;
    margin: 0;
    color: #fff;
    background: transparent;
    border: 0;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
}

.maui-login-btn,
.maui-profile-btn,
.web-mobile-login-btn,
.web-mobile-profile-btn {
    flex: 0 0 30px;
    width: 30px;
    min-width: 30px;
    height: 30px;
    font-size: 0.9rem;
}

.maui-lang-wrapper {
    flex: 0 0 auto;
    min-width: 0;
}

    .maui-lang-wrapper .bp-lang-btn {
        min-width: 0;
        padding: 3px 5px;
        font-size: 11px;
        white-space: nowrap;
    }

/* Keep the Web mobile header hidden on desktop widths. */
@media (min-width: 993px) {
    .web-mobile-header {
        display: none;
    }
}

/* On very narrow screens, preserve title visibility by compacting controls. */
@media (max-width: 380px) {
    .maui-header,
    .web-mobile-header {
        gap: 2px;
        padding-left: 4px;
        padding-right: 4px;
    }

    .maui-menu-btn,
    .web-mobile-menu-btn {
        flex-basis: 30px;
        width: 30px;
    }

    .maui-brand-text,
    .web-mobile-brand-text {
        font-size: 10px !important;
    }

    .maui-header-actions,
    .web-mobile-actions {
        gap: 1px !important;
    }

    .maui-home-btn,
    .web-mobile-home-btn {
        flex-basis: 23px;
        width: 23px;
        min-width: 23px;
    }

    .maui-login-btn,
    .maui-profile-btn,
    .web-mobile-login-btn,
    .web-mobile-profile-btn {
        flex-basis: 27px;
        width: 27px;
        min-width: 27px;
        height: 29px;
    }

    .maui-lang-wrapper .bp-lang-btn {
        padding: 2px 4px;
        font-size: 10px;
    }
}

.maui-user-details,
.web-mobile-user-details {
    flex: 1;
    min-width: 0;
}

.bp-profile-username {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.7);
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

.bp-logout-btn {
    background: transparent;
    border: 1px solid #DC2626;
    color: #DC2626;
    padding: 10px 16px;
    border-radius: 30px;
    cursor: pointer;
}

    .bp-logout-btn:hover {
        background: #DC2626;
        color: white;
    }

.maui-shell .maui-header {
    justify-content: flex-start;
    gap: 0.5rem;
}

.maui-shell .maui-header .maui-brand {
    flex: 1 1 auto;
    min-width: 0;
    justify-content: flex-start;
    margin-left: 1rem;
}

.maui-shell .maui-header .maui-brand-text {
    font-size: 1.3rem;
    font-weight: 500;
    letter-spacing: 0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Styles migrated from MainLayout.razor.css */
.page {
    position: relative;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

.sidebar {
    background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
}

.top-row {
    background-color: #f7f7f7;
    border-bottom: 1px solid #d6d5d5;
    justify-content: flex-end;
    height: 3.5rem;
    display: flex;
    align-items: center;
}

.top-row a, .top-row .btn-link {
    white-space: nowrap;
    margin-left: 1.5rem;
    text-decoration: none;
}

.top-row a:hover, .top-row .btn-link:hover {
    text-decoration: underline;
}

.top-row a:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 640.98px) {
    .top-row {
        justify-content: space-between;
    }

    .top-row a, .top-row .btn-link {
        margin-left: 0;
    }
}

@media (min-width: 641px) {
    .page {
        flex-direction: row;
    }

    .sidebar {
        width: 250px;
        height: 100vh;
        position: sticky;
        top: 0;
    }

    .top-row {
        position: sticky;
        top: 0;
        z-index: 1;
    }

    .top-row.auth a:first-child {
        flex: 1;
        text-align: right;
        width: 0;
    }

    .top-row, article {
        padding-left: 2rem !important;
        padding-right: 1.5rem !important;
    }
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

@media (max-width: 992px) {
    .web-shell > .web-mobile-header {
        display: flex !important;
    }

    .web-shell > .bp-main-header {
        display: block !important;
    }
}

@media (min-width: 993px) {
    .web-shell > .web-mobile-header,
    .web-shell > .web-mobile-drawer,
    .web-shell > .web-mobile-overlay {
        display: none !important;
    }

    .web-shell > .bp-main-header {
        display: block !important;
    }
}
