﻿/* ═══════════════════════════════════════════════
/* ═══════════════════════════════════════════════
   Landing / Home page
   ═══════════════════════════════════════════════ */

#app:has(.landing-page) {
    background: linear-gradient(to left, #F7F9FE 24%, #F7F8FA 74%);
}

    #app:has(.landing-page) #GDContent {
        padding-top: 0 !important;
        height: 100vh;
        overflow: hidden;
    }

.landing-page {
    height: 100%;
}

    #app:has(.landing-page) #GDNavbar {
        background: transparent !important;
        box-shadow: none !important;
        position: relative;
    }

        #app:has(.landing-page) #GDNavbar .app-name {
            display: none !important;
        }

/* ─── Hero ─── */

.landing-hero {
}

.landing-hero-left {
    flex: 1;
    min-width: 280px;
}

.landing-hero-icon {
    color: var(--mud-palette-darker-blue) !important;
    width: 55px;
}

.landing-app-name {
    font-size: 2rem !important;
}

.landing-hero-subtitle {
    font-size: 1.05rem !important;
    color: var(--mud-palette-darker-blue) !important;
}

.landing-hero-right {
    flex: 0 0 25vw;
    max-width: 25vw;
    min-width: 280px;
    margin-left: auto;
    padding: 0 !important;
    display: flex;
}

.landing-map-container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: stretch;
    width: 100%;
    height: 100%;
    padding: 0 !important;
    min-height: 250px;
    background-color: white;
    box-shadow: .2rem .2rem .4rem var(--mud-palette-medium-gray-5O);
    position: relative;
    overflow: hidden;
    transition: all .4s cubic-bezier(0.4, 0, 0.2, 1);
}

.landing-map {
    flex: 1;
    width: 100%;
    height: 100%;
    min-height: 250px;
    z-index: 0;
}

.landing-map-container.landing-map-expanded {
    position: fixed !important;
    top: 1.5rem;
    left: 1.5rem;
    width: calc(100vw - 3rem) !important;
    height: calc(100vh - 3rem) !important;
    z-index: 9999;
    border-radius: 1rem !important;
    max-width: calc(100vw - 3rem) !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: 0 8px 32px rgba(0,0,0,.3);
}

.landing-map-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,.5);
    z-index: 9998;
}

.landing-map-container.landing-map-expanded .landing-map {
    min-height: calc(100vh - 3rem);
}

.landing-map-close-btn, .landing-map-expand-btn {
    position: absolute !important;
    top: 1rem;
    right: 1rem;
    z-index: 10000;
    background-color: white !important;
    box-shadow: 0 2px 6px rgba(0,0,0,.25);
    border-radius: 50%;
}
    .landing-map-close-btn .mud-icon-root,
    .landing-map-expand-btn .mud-icon-root {
        color: var(--mud-palette-darker-blue) !important;
    }

.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
    color: var(--mud-palette-darker-blue) !important;
}

    .leaflet-control-zoom-in:hover,
    .leaflet-control-zoom-out:hover {
        color: var(--mud-palette-darker-blue) !important;
    }

.landing-map-expand-overlay {
    display: none;
}

/* Leaflet custom marker */
.leaflet-marker-custom {
    background: none !important;
    border: none !important;
}

.map-marker-badge {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--mud-palette-darker-blue, #003366);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: .85rem;
    box-shadow: 0 2px 6px rgba(0,0,0,.35);
    border: 2px solid white;
}

.landing-map-text {
    color: var(--mud-palette-darker-blue);
    font-weight: bold;
    margin-top: .5rem;
}

/* ─── Action Cards ─── */

.landing-action-card {
    background-color: white !important;
    box-shadow: .2rem .2rem .4rem var(--mud-palette-medium-gray-5O);
    border: 1px solid var(--mud-palette-medium-gray-10O);
    height: 100%;
    padding: 1.5rem;
    gap: 1rem;
    border-radius: .8rem;
}

.landing-action-card-title {
    font-size: 1.05rem !important;
    width: 100%;
    padding-bottom: 1rem !important;
    border-bottom: 1px solid var(--mud-palette-medium-gray-10O);
}

.landing-action-card-desc {
    font-size: .875rem !important;
}

.landing-action-btn {
    background-color: color-mix(90% var(--mud-palette-darker-blue), 10% white) !important;
    color: white !important;
    font-weight: bold !important;
    border-radius: .8rem !important;
    padding-block: .75rem !important;
}

    .landing-action-btn .mud-icon-root {
        color: white !important;
    }

/* ─── Dashboard panels ─── */

.landing-dashboard {
    flex: 1;
    min-height: 0;
}

    .landing-dashboard > .mud-item {
        display: flex;
    }

.landing-panel {
    background-color: #FFFFFF01 !important;
    box-shadow: .5rem .5rem .9rem var(--mud-palette-medium-gray-5O), -.3rem -.3rem .5rem white;
    padding: 1.5rem !important;
    height: 100%;
    border-radius: .8rem;
    min-height: 0;
    overflow: hidden;
    max-height: 650px;
}

    .landing-panel .panel-title {
        font-size: 1.05rem !important;
        flex-shrink: 0;
    }

.landing-panel-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.landing-empty-text {
    color: var(--mud-palette-medium-gray-50O);
    font-style: italic;
}

/* ─── Mobile: allow page scroll and taller panels ─── */

@media (max-width: 960px) {
    #app:has(.landing-page) #GDContent {
        height: auto;
        overflow: auto;
    }

    .landing-page {
        height: auto;
    }

    .landing-dashboard {
        flex: none;
    }

    .landing-panel {
        min-height: 350px;
    }

    .landing-panel-content {
        overflow-y: auto;
        max-height: 350px;
    }
}

/* ─── Pending approvals ─── */

.landing-approval-row {
    border-radius: .95rem;
    border: 1px solid var(--mud-palette-medium-gray-5O);
    box-shadow: .2rem .2rem .4rem var(--mud-palette-medium-gray-5O);
    background-color: white;
    align-items: stretch;
}


.landing-approval-thumb {
    width: 100px !important;
}

    .landing-approval-thumb .cards2D-container {
        height: 100% !important;
    }

    .landing-approval-thumb .cards2D-inner-container {
        width: 100% !important;
        height: 100% !important;
    }

    .landing-approval-thumb .card2D-container .card2D,
    .landing-approval-thumb .card2D-container .card2D .card2D-color-container,
    .landing-approval-thumb .card2D-container .card2D .card2D-image-container,
    .landing-approval-thumb .cards2D-container .card2D-container .card2D,
    .landing-approval-thumb .cards2D-container .cards2D-inner-container .card2D-container {
        border-radius: 0 !important;
        border-top-left-radius: .95rem !important;
        border-bottom-left-radius: .95rem !important;
    }

.landing-approval-code {
    font-size: .8rem !important;
}

.landing-approval-status {
    font-size: .75rem !important;
    white-space: nowrap;
}

.landing-approval-row .flex-1 {
    flex: 1 !important;
}

/* ─── Carousel (latest designs) ─── */

.landing-carousel-container {
    --carousel-card-w: 60%;
    position: relative;
    padding-top: 20%;
    flex: 1;
    display: flex !important;
    flex-direction: column;
    justify-content: space-between;
}

.landing-carousel-stack {
    position: relative;
    width: 100%;
}

/* ─ All cards ─ */

.landing-carousel-card {
    position: absolute;
    top: 0;
    left: 0;
    width: var(--carousel-card-w) !important;
    transition: left .45s cubic-bezier(0.4, 0, 0.2, 1), top .45s cubic-bezier(0.4, 0, 0.2, 1);
}

    .landing-carousel-card:not(.landing-carousel-card-active) {
        top: 10%;
    }

    .landing-carousel-card .cards2D-container {
        perspective: none !important;
    }

    .landing-carousel-card .cards2D-container .cards2D-inner-container {
        width: 100% !important;
        cursor: default;
        transform: none !important;
        border-radius: .8rem;
    }

        .landing-carousel-card .cards2D-container .cards2D-inner-container:hover {
            transform: none !important;
        }

    .landing-carousel-card .card2D-container {
        width: 100% !important;
    }

        .landing-carousel-card .card2D-container .card2D,
        .landing-carousel-card .cards2D-container .cards2D-inner-container .card2D-container {
            border-radius: .8rem !important;
        }

/* ─ Active card ─ */

.landing-carousel-card-active {
    position: relative;
    --carousel-card-w: 80%;
}

/* ─ Behind cards (stack) ─ */

.landing-carousel-card-behind {
    pointer-events: none;
}

/* ─ View Design button (glass overlay) ─ */

.landing-carousel-card .landing-carousel-view-btn {
    position: absolute;
    bottom: .75rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    background: rgba(255, 255, 255, .6) !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 1000px !important;
    color: var(--mud-palette-darker-blue) !important;
    font-weight: bold !important;
    padding: .4rem 1.25rem !important;
    font-size: .8rem !important;
    box-shadow: 0 .15rem .4rem rgba(0, 0, 0, .12);
    transition: opacity .3s cubic-bezier(0.4, 0, 0.2, 1);
}

    .landing-carousel-card .landing-carousel-view-btn .mud-icon-root {
        color: var(--mud-palette-darker-blue) !important;
        font-size: 1rem !important;
    }

.landing-carousel-card-active .landing-carousel-view-btn {
    opacity: 1;
    pointer-events: all;
}

.landing-carousel-card-behind .landing-carousel-view-btn {
    opacity: 0;
    pointer-events: none;
}
