﻿/* ======================================================
   PLANEUR CORE
   Global Layout + Application Shell
====================================================== */

/* ------------------------------------------------------
   BODY
---------------------------------------------------------*/

.pantone-body {
    background-color: var(--pantone-background);
    font-family: 'Inter','Segoe UI',sans-serif;
    color: var(--text-main);
    line-height: 1.5;
    width: 100vw;
    height: 100vh;
    display: flex;
    overflow: hidden;
}

/* ------------------------------------------------------
   APPLICATION LAYOUT
---------------------------------------------------------*/

#mainAreaWrapper {
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: hidden;
}

.pantone-main-container {
    margin-top: calc(var(--planeur-header-height) + 6px);
    margin-left: 6px;
    min-height: calc(100vh - var(--planeur-header-height) - 6px);
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: var(--space-5);
    background-color: var(--pantone-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow-y: auto;
    scroll-behavior: smooth;
    position: relative;
}

    .pantone-main-container.securitybackground {
        background-color: color-mix( in srgb, var(--pantone-surface) 10%, transparent );
    }

    .pantone-main-container.background {
        background-color: color-mix( in srgb, var(--pantone-surface) 80%, transparent );
    }

/* ------------------------------------------------------
   BRAND
---------------------------------------------------------*/

.pantone-brand {
    height: var(--planeur-header-height);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pantone-brand-logo {
    height: 48px;
    width: auto;
}

.pantone-brand-org {
    color: var(--pantone-accent);
    font-weight: 600;
    letter-spacing: .3px;
    opacity: .85;
    text-transform: none;
    font-size: 18px;
}

/* ------------------------------------------------------
   COMMON CONTAINERS
---------------------------------------------------------*/

.page-wrapper {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 210px);
}

.map-container {
    width: 100%;
    height: calc(100vh - 180px);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

/* ------------------------------------------------------
   🌈 FOOTER
---------------------------------------------------------*/

.pantone-footer {
    border-top: 1px solid rgba(0,0,0,0.05);
    color: var(--text-muted);
    font-size: var(--text-sm);
    padding: 1rem;
}

/* ------------------------------------------------------
   UTILITIES
---------------------------------------------------------*/

.drag-handle {
    cursor: grab;
    user-select: none;
}

    .drag-handle:active {
        cursor: grabbing;
    }

.mobile-field-label {
    display: none;
}

.action-text {
    display: inline;
}

.action-icon {
    display: inline-block;
}

/* ------------------------------------------------------
   LOADING OVERLAYS
---------------------------------------------------------*/

.pantone-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    z-index: 9999;
    background: rgba(255,255,255,.85);
    backdrop-filter: blur(3px);
}

    .pantone-loading-overlay .spinner-container {
        height: 100%;
    }

.fullscreen-overlay {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    display: none;
}

/* ------------------------------------------------------
   DRAG & DROP
---------------------------------------------------------*/

.drag-handle {
    cursor: grab;
    user-select: none;
}

    .drag-handle:active {
        cursor: grabbing;
    }

/* ------------------------------------------------------
   GENERIC HELPERS
---------------------------------------------------------*/

.text-ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scroll-x {
    overflow-x: auto;
}

.scroll-y {
    overflow-y: auto;
}

/* ======================================================
   BACKGROUNDS
====================================================== */

.login-background {
    background-image: url('/img/new_login_background.png');
    background-repeat: repeat-x; /* repeat horizontally only */
    background-size: auto 100%; /* stretch vertically to full height */
    background-position: center top;
}

.standard-background {
    background-image: url('/img/new_login_background.png');
    background-repeat: repeat-x; /* repeat horizontally only */
    background-size: auto 100%; /* stretch vertically to full height */
    background-position: center top;
}

/* ------------------------------------------------------
   MOBILE LAYOUT
---------------------------------------------------------*/

@media (max-width:768px) {

    .pantone-main-container {
        margin-top: var(--planeur-header-height) !important;
        margin-left: 1px !important;
        min-height: calc( 100vh - var(--planeur-header-height) ) !important;
        padding: 10px !important;
        border-radius: 0 !important;
    }

    .page-wrapper {
        height: auto;
    }

    .mobile-field-label {
        display: block;
        margin-bottom: 6px;
        font-size: .85rem;
        font-weight: 600;
        color: var(--pantone-primary);
    }

    .action-text {
        display: none;
    }

    .action-icon {
        margin-right: 0 !important;
    }
}
