/* Karmalipi AI Console - Phase 1 Revision 7 */

:root {
    /* Brand Colors */
    --km-teal: #2A4B59;
    --km-amber: #CF9003;

    /* Backgrounds */
    --km-bg-main: #FFFFFF;
    --km-bg-sidebar: #FFFCF2;

    /* UI Elements */
    --km-border: #E0E0E0;
    --km-surface: #FFFFFF;
    --km-text: #2D3436;
    --km-text-light: #636E72;
    --km-accent-light: rgba(207, 144, 3, 0.1);

    /* Layout - Rev 7: Wider Left Sidebar (350px) */
    --cols-layout: 350px 1fr 70px;
    --radius: 12px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    background-color: var(--km-bg-main);
    color: var(--km-text);
    overflow: hidden;
}

#app-container {
    display: grid;
    grid-template-columns: var(--cols-layout);
    grid-template-areas: "left center right";
    height: 100vh;
    width: 100vw;
    /* REV 8.3: Force iOS click bubbling */
    cursor: pointer;
}

/* --- Mobile Header & Drawer --- */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: var(--km-bg-sidebar);
    border-bottom: 1px solid var(--km-border);
    z-index: 9000;
    /* REV 7.6: Max Z-Index */
    padding: 0 20px;
    align-items: center;
    justify-content: space-between;
}

.mobile-logo {
    height: 30px;
}

#mobile-menu-toggle {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--km-teal);
    cursor: pointer;
}

.mobile-drawer {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: var(--km-bg-sidebar);
    z-index: 10000;
    /* REV 7.6: Higher than everything */
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    flex-direction: column;
    padding: 20px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.mobile-drawer.active {
    transform: translateX(0);
    display: flex;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.drawer-logo {
    height: 24px;
}

#close-drawer-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--km-text);
    cursor: pointer;
}

.drawer-nav {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.drawer-item {
    font-size: 16px;
    color: var(--km-teal);
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

.drawer-item:hover,
.drawer-item.active {
    background: var(--km-surface);
    color: var(--km-amber);
}

.drawer-separator {
    height: 1px;
    background: var(--km-border);
    margin: 10px 0;
}

.ml-auto {
    margin-left: auto;
}

.drawer-submenu {
    padding-left: 20px;
    display: none;
    flex-direction: column;
    gap: 10px;
    margin-top: 5px;
}

.drawer-submenu.show {
    display: flex;
}

.submenu-item {
    font-size: 14px;
    color: var(--km-text-light);
    padding: 5px;
    cursor: pointer;
    display: flex;
    gap: 10px;
    align-items: center;
}

/* --- LEFT SIDEBAR --- */
.left-sidebar {
    grid-area: left;
    background: var(--km-bg-sidebar);
    border-right: 1px solid var(--km-border);
    display: flex;
    flex-direction: column;
    padding: 20px;
    z-index: 20;
}

.logo-area {
    margin-bottom: 25px;
}

.sidebar-logo {
    height: 32px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.left-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.chart-panel {
    flex: 1;
    background: var(--km-surface);
    border-radius: var(--radius);
    border: 1px solid var(--km-border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 250px;
    /* Rev 7: Add box shadow */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.chart-header {
    padding: 10px;
    border-bottom: 1px solid var(--km-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--km-teal);
    text-transform: uppercase;
    background: #fdfdfd;
}

.toggle-btn {
    background: var(--km-bg-sidebar);
    border: 1px solid var(--km-border);
    padding: 2px 8px;
    font-size: 10px;
    cursor: pointer;
    color: var(--km-text-light);
}

.toggle-btn.active {
    background: var(--km-teal);
    color: #fff;
    border-color: var(--km-teal);
}

.chart-canvas {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background: #fff;
}

.empty-state {
    color: var(--km-amber);
    font-size: 12px;
}

.info-panel {
    padding: 15px;
    background: var(--km-surface);
    border-radius: var(--radius);
    border: 1px solid var(--km-border);
}

.info-item {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 5px;
}

.info-item label {
    color: var(--km-text-light);
}

.info-item span {
    font-weight: 600;
    color: var(--km-teal);
}

.status-live {
    color: #2ecc71 !important;
}

/* --- CENTER PANEL --- */
.center-panel {
    grid-area: center;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Critical for inner scrolling */
    background: var(--km-bg-main);
}

.view-container {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 120px;
    padding-top: 20px;
    scroll-behavior: smooth;
    min-height: 0;
    /* Critical for Flexbox scrolling */
}

/* Mobile Chart Bar (Thin Handle) */
.mobile-chart-bar {
    background: var(--km-bg-sidebar);
    border-bottom: 1px solid var(--km-border);
    height: 24px;
    /* Reduced from 32px */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--km-teal);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    z-index: 60;
}

.mobile-chart-panel {
    display: none;
    background: var(--km-surface);
    padding: 0;
    border-bottom: 1px solid var(--km-border);
}

.mobile-chart-panel.active {
    display: flex;
    flex-direction: column;
    height: 300px;
    /* Reduced from 350px */
    z-index: 900;
}

.mobile-chart-content {
    /* Re-style for inner padding inside the modal/panel */
    padding: 10px;
    height: 100%;
}


.input-wrapper {
    display: flex;
    align-items: center;
    background: var(--km-bg-main);
    border: 1px solid var(--km-border);
    border-radius: 12px;
    padding: 6px 15px;
}

.input-wrapper textarea {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    color: var(--km-text);
    outline: none;
    resize: none;
    overflow-y: hidden;
    min-height: 40px;
    max-height: 120px;
    line-height: 1.4;
}

.icon-btn {
    background: none;
    border: none;
    padding: 8px;
    color: var(--km-amber);
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s;
}

.icon-btn:hover {
    transform: scale(1.1);
    color: var(--km-teal);
}

.send-btn {
    color: var(--km-teal);
}

/* Selectors */
.selectors-row {
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
}

.selector-container {
    position: relative;
}

.selector-trigger {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--km-teal);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
}

.selector-trigger:hover {
    background: var(--km-accent-light);
    color: var(--km-amber);
}

.selector-trigger.active-menu {
    background: var(--km-accent-light);
    color: var(--km-amber);
}

/* Popup Defaults (Desktop) */
.selector-popup {
    position: absolute;
    bottom: 150%;
    right: 0;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--km-surface);
    border: 1px solid var(--km-border);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    padding: 10px;
    min-width: 170px;
    /* Default Narrow */
    z-index: 5000;
    margin-bottom: 10px;
    display: none;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
}

/* REV 37: Wide Menu for Themes */
.selector-popup.wide-popup {
    min-width: 280px !important;
}

.selector-popup.show {
    display: block;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Override for Right Sidebar */
.right-sidebar .selector-popup {
    right: 120%;
    /* Safely to the left of the sidebar */
    left: auto;
    bottom: 0;
    transform: none;
}

.right-sidebar .selector-popup.show {
    transform: none;
}

.scrollable-menu {
    max-height: 200px;
    overflow-y: auto;
}

/* ... Scrollbar ... */
.scrollable-menu::-webkit-scrollbar {
    width: 4px;
}

.scrollable-menu::-webkit-scrollbar-thumb {
    background: var(--km-border);
    border-radius: 2px;
}

/* ... */
.scrollable-menu::-webkit-scrollbar-thumb {
    background: var(--km-border);
    border-radius: 2px;
}

.popup-title {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--km-amber);
    font-weight: 700;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--km-border);
    padding-bottom: 4px;
    text-align: center;
}

.popup-item {
    padding: 6px 10px;
    font-size: 12px;
    color: var(--km-text);
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
}

.popup-item:hover {
    background: var(--km-accent-light);
    color: var(--km-amber);
}

.popup-item.active {
    background: var(--km-amber);
    color: #fff;
}

.popup-grid {
    display: grid;
    gap: 4px;
}

.two-col {
    grid-template-columns: 1fr 1fr;
}

/* ... */

/* --- RIGHT SIDEBAR --- */
.right-sidebar {
    grid-area: right;
    background: var(--km-bg-sidebar);
    border-left: 1px solid var(--km-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 0;
    gap: 30px;
    z-index: 1200;
    /* REV 8.3: Higher than Input Bar (900) */
    overflow: visible;
    /* REV 7.6: Allow Popups to overflow */
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
}

.nav-item {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--km-teal);
    font-size: 18px;
    border-radius: 10px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

.nav-item:hover {
    background: rgba(42, 75, 89, 0.1);
}

.nav-item.active {
    background: var(--km-teal);
    color: #fff;
    box-shadow: 0 4px 10px rgba(42, 75, 89, 0.3);
}

/* Custom Tooltips (Left) */
[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    right: 120%;
    top: 50%;
    transform: translateY(-50%);
    background: var(--km-amber);
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

[data-tooltip]:hover::after {
    opacity: 1;
}

[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent transparent var(--km-amber);
    z-index: 1000;
}


.profile-section {
    margin-top: auto;
    position: relative;
}

.avatar-circle-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--km-amber);
    color: #fff;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-popup {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 5px;
    /* REV 8.1: Tighter spacing */
    width: 220px;
    background: var(--km-surface);
    border: 1px solid var(--km-border);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    padding: 10px;
    display: none;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    transform: translateY(10px);
    z-index: 2000;
    /* REV 8.1: High Z-Index to overlap Input Bar */
}

.profile-popup.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.profile-header {
    border-bottom: 1px solid var(--km-border);
    padding-bottom: 8px;
    margin-bottom: 5px;
}

.profile-header strong {
    display: block;
    font-size: 13px;
    color: var(--km-teal);
}

.profile-header span {
    font-size: 10px;
    color: var(--km-text-light);
}

.profile-popup ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.profile-popup li {
    padding: 8px;
    font-size: 12px;
    color: var(--km-text);
    cursor: pointer;
    display: flex;
    gap: 10px;
    align-items: center;
    border-radius: 6px;
}

.profile-popup li:hover {
    background: var(--km-accent-light);
    color: var(--km-amber);
}

/* --- AI LOADER BUBBLE --- */
.karmalipi-loader {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid rgba(42, 75, 89, 0.12);
    border-left: 3px solid var(--km-teal);
    border-radius: 12px 12px 12px 6px;
    padding: 10px 14px;
    width: max-content;
    margin: 10px 0;
    align-self: flex-start;
    font-family: inherit;
    color: var(--km-teal);
}

.karmalipi-loader .loader-box {
    width: 28px;
    height: 28px;
    border: 2px solid var(--km-teal);
    border-radius: 6px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.karmalipi-loader .loader-dot {
    width: 6px;
    height: 6px;
    background: var(--km-amber);
    border-radius: 50%;
    position: absolute;
    animation: km-orbit 1.2s linear infinite;
}

@keyframes km-orbit {
    0% {
        transform: rotate(0deg) translateX(8px) rotate(0deg);
    }

    50% {
        transform: rotate(180deg) translateX(8px) rotate(-180deg);
    }

    100% {
        transform: rotate(360deg) translateX(8px) rotate(-360deg);
    }
}

.karmalipi-loader .loader-text {
    font-size: 13px;
    color: var(--km-teal);
    opacity: 0.95;
}

/* --- RESPONSIVE LAYOUT (Global Defaults defined above, overrides here) --- */

/* --- INPUT ISLAND (Global Scope - Desktop First) --- */
.input-island-container {
    position: fixed;
    bottom: 30px;
    left: 260px;
    /* Left Sidebar Width approx */
    right: 80px;
    /* Right Sidebar Width approx */
    display: flex;
    justify-content: center;
    padding: 0 40px;
    pointer-events: none;
    z-index: 1000;
}

.input-island {
    pointer-events: auto;
    width: 100%;
    max-width: 750px;
    background: var(--km-surface);
    /* REV 7.8: Darker border for Desktop Visibility */
    border: 1px solid #bbb;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* --- MEDIA QUERIES --- */

/* Tablet / Standard Mobile (Max 900px) */
@media (max-width: 900px) {
    #app-container {
        grid-template-columns: 1fr;
        grid-template-areas: "mobile_header" "center";
        grid-template-rows: 60px 1fr;
    }

    .left-sidebar,
    .right-sidebar {
        display: none;
    }

    .mobile-header {
        display: flex;
    }

    .center-panel {
        grid-area: center;
    }

    .view-container {
        padding-top: 20px;
        padding-left: 20px;
        padding-right: 20px;
    }

    .kl-message {
        max-width: 90%;
    }

    /* Adjust Input Island for Mobile */
    .input-island-container {
        padding: 0 10px;
        bottom: 10px;
        left: 0;
        right: 0;
    }

    .input-island {
        border-radius: 15px;
    }

    /* Mobile Profile Trigger */
    .profile-trigger-mobile {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px;
        border-radius: 8px;
        color: var(--km-teal);
        font-weight: 500;
        cursor: pointer;
        border: 1px solid var(--km-border);
        margin-top: auto;
    }

    .profile-trigger-mobile:hover {
        background: var(--km-surface);
    }

    .mobile-profile-menu {
        display: none;
        flex-direction: column;
        gap: 5px;
        padding-left: 15px;
        margin-top: 5px;
        border-left: 2px solid var(--km-border);
    }

    .mobile-profile-menu.show {
        display: flex;
    }

    /* Mobile Chart Panel */
    .mobile-chart-panel {
        display: none;
        background: var(--km-surface);
        padding: 10px;
        border-bottom: 1px solid var(--km-border);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    }

    .mobile-chart-panel.active {
        display: flex;
        flex-direction: column;
        height: 350px;
        z-index: 900;
    }
}

/* Small Mobile (Max 768px) */
@media (max-width: 768px) {

    /* Selector Popup Fixes for Mobile */
    .selector-container:first-child .selector-popup.show {
        transform: translateX(0) translateY(0);
    }

    .selector-container:last-child .selector-popup {
        left: auto;
        right: 0;
        transform: translateX(0) translateY(10px);
    }

    .selector-container:last-child .selector-popup.show {
        transform: translateY(0);
    }

    .input-island-container {
        position: fixed;
        bottom: 10px;
        padding: 0 10px;
    }
}

/* --- AI LOADER BUBBLE --- */
.karmalipi-loader {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid rgba(42, 75, 89, 0.12);
    border-left: 3px solid var(--km-teal);
    border-radius: 12px 12px 12px 6px;
    padding: 10px 14px;
    width: max-content;
    margin: 10px 0;
    align-self: flex-start;
    font-family: inherit;
    color: var(--km-teal);
}

.karmalipi-loader .loader-box {
    width: 28px;
    height: 28px;
    border: 2px solid var(--km-teal);
    border-radius: 6px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.karmalipi-loader .loader-dot {
    width: 6px;
    height: 6px;
    background: var(--km-amber);
    border-radius: 50%;
    position: absolute;
    animation: km-orbit 1.2s linear infinite;
}

@keyframes km-orbit {
    0% {
        transform: rotate(0deg) translateX(8px) rotate(0deg);
    }

    50% {
        transform: rotate(180deg) translateX(8px) rotate(-180deg);
    }

    100% {
        transform: rotate(360deg) translateX(8px) rotate(-360deg);
    }
}

.karmalipi-loader .loader-text {
    color: var(--km-teal);
    opacity: 0.95;
}

/* --- INPUT ISLAND (Global) --- */
.input-island-container {
    position: fixed;
    bottom: 30px;
    left: 350px;
    /* REV 8.4: Match Left Sidebar */
    right: 70px;
    /* REV 8.4: Match Right Sidebar */
    display: flex;
    justify-content: center;
    padding: 0 40px;
    pointer-events: none;
    /* REV 8.1: Lower than Profile (2000) */
    z-index: 900;
}

.input-island {
    pointer-events: auto;
    width: 100%;
    max-width: 750px;
    background: var(--km-surface);
    border: 1px solid #bbb;
    /* Visible Border */
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* --- Responsive (900px) --- */
@media (max-width: 900px) {
    #app-container {
        grid-template-columns: 1fr;
        grid-template-areas: "mobile_header" "center";
        grid-template-rows: 60px 1fr;
    }

    .left-sidebar,
    .right-sidebar {
        display: none;
    }

    .mobile-header {
        display: flex;
    }

    .view-container {
        padding-top: 20px;
        padding-left: 20px;
        padding-right: 20px;
    }

    /* Adjust Input Island for Mobile */
    .input-island-container {
        padding: 0 10px;
        bottom: 10px;
        left: 0;
        right: 0;
    }

    .input-island {
        border-radius: 15px;
    }

    /* Mobile Profile Trigger */
    .profile-trigger-mobile {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px;
        border-radius: 8px;
        color: var(--km-teal);
        font-weight: 500;
        cursor: pointer;
        border: 1px solid var(--km-border);
        margin-top: auto;
    }

    .profile-trigger-mobile:hover {
        background: var(--km-surface);
    }

    .mobile-profile-menu {
        display: none;
        flex-direction: column;
        gap: 5px;
        padding-left: 15px;
        margin-top: 5px;
        border-left: 2px solid var(--km-border);
        /* REV 8.1: Scroll Support */
        max-height: 50vh;
        overflow-y: auto;
    }

    .mobile-profile-menu.show {
        display: flex;
    }

    /* Mobile Chart Panel */
    .mobile-chart-panel {
        display: none;
        background: var(--km-surface);
        padding: 10px;
        border-bottom: 1px solid var(--km-border);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    }

    .mobile-chart-panel.active {
        display: flex;
        flex-direction: column;
        height: 350px;
        z-index: 900;
    }
}

/* Mobile Small (768px) Specifics */
@media (max-width: 768px) {
    .selector-container:first-child .selector-popup.show {
        transform: translateX(0) translateY(0);
        min-width: 240px;
        /* REV 8.1: Widen */
    }

    .selector-container:last-child .selector-popup {
        left: auto;
        right: 0;
        transform: translateX(0) translateY(10px);
    }

    .selector-container:last-child .selector-popup.show {
        transform: translateY(0);
    }
}/ *   - - -   R E D E S I G N :   M O B I L E   B O T T O M   S H E E T S   &   D E S K T O P   A D J U S T M E N T S   - - -   * /  
  
 / *   1 .   D e s k t o p   W i d t h s   ( R e f i n e d )   * /  
 @ m e d i a   ( m i n - w i d t h :   7 6 9 p x )   {  
  
         / *   D e f a u l t   S e l e c t o r s   ( N a r r o w e r )   * /  
         . s e l e c t o r - p o p u p : n o t ( . p r o f i l e - p o p u p )   {  
                 w i d t h :   1 7 0 p x   ! i m p o r t a n t ;  
                 m i n - w i d t h :   1 7 0 p x   ! i m p o r t a n t ;  
         }  
  
         / *   T h e m e s   S e l e c t o r   ( W i d e )   * /  
         . s e l e c t o r - p o p u p . w i d e - p o p u p   {  
                 w i d t h :   2 8 0 p x   ! i m p o r t a n t ;  
                 m i n - w i d t h :   2 8 0 p x   ! i m p o r t a n t ;  
         }  
 }  
  
 / *   2 .   M o b i l e   B o t t o m   S h e e t s   ( T h e   " O n e   T r u e   L a y o u t " )   * /  
 @ m e d i a   ( m a x - w i d t h :   7 6 8 p x )   {  
  
         / *   R e s e t   a n y   p r e v i o u s   t r a n s f o r m s / p o s i t i o n s   * /  
         . s e l e c t o r - c o n t a i n e r   . s e l e c t o r - p o p u p ,  
         . s e l e c t o r - c o n t a i n e r : l a s t - c h i l d   . s e l e c t o r - p o p u p ,  
         . r i g h t - s i d e b a r   . s e l e c t o r - p o p u p   {  
                 t o p :   a u t o   ! i m p o r t a n t ;  
                 b o t t o m :   0   ! i m p o r t a n t ;  
                 l e f t :   0   ! i m p o r t a n t ;  
                 r i g h t :   0   ! i m p o r t a n t ;  
                 t r a n s f o r m :   t r a n s l a t e Y ( 1 0 0 % )   ! i m p o r t a n t ;  
                 / *   S t a r t   o f f - s c r e e n   * /  
  
                 w i d t h :   1 0 0 %   ! i m p o r t a n t ;  
                 m i n - w i d t h :   1 0 0 %   ! i m p o r t a n t ;  
                 m a x - w i d t h :   1 0 0 %   ! i m p o r t a n t ;  
  
                 b o r d e r - r a d i u s :   2 0 p x   2 0 p x   0   0   ! i m p o r t a n t ;  
                 m a r g i n :   0   ! i m p o r t a n t ;  
                 p o s i t i o n :   f i x e d   ! i m p o r t a n t ;  
                 z - i n d e x :   1 0 0 0 0   ! i m p o r t a n t ;  
  
                 t r a n s i t i o n :   t r a n s f o r m   0 . 3 s   c u b i c - b e z i e r ( 0 . 2 ,   0 . 8 ,   0 . 2 ,   1 )   ! i m p o r t a n t ;  
                 d i s p l a y :   b l o c k   ! i m p o r t a n t ;  
                 / *   E n s u r e   i t ' s   l a y o u t - r e a d y   * /  
                 v i s i b i l i t y :   h i d d e n ;  
                 / *   H i d e   u n t i l   ' s h o w '   * /  
         }  
  
         / *   A c t i v e   S t a t e   * /  
         . s e l e c t o r - c o n t a i n e r   . s e l e c t o r - p o p u p . s h o w ,  
         . s e l e c t o r - c o n t a i n e r : l a s t - c h i l d   . s e l e c t o r - p o p u p . s h o w ,  
         . r i g h t - s i d e b a r   . s e l e c t o r - p o p u p . s h o w   {  
                 t r a n s f o r m :   t r a n s l a t e Y ( 0 )   ! i m p o r t a n t ;  
                 / *   S l i d e   U p   * /  
                 v i s i b i l i t y :   v i s i b l e   ! i m p o r t a n t ;  
                 o p a c i t y :   1   ! i m p o r t a n t ;  
         }  
  
         / *   S t y l i n g   * /  
         . s e l e c t o r - p o p u p   {  
                 o p a c i t y :   1   ! i m p o r t a n t ;  
                 / *   O v e r r i d e   f a d e - i n   l o g i c   f o r   s l i d e - u p   * /  
                 b o r d e r :   n o n e   ! i m p o r t a n t ;  
                 b o x - s h a d o w :   0   - 4 p x   2 0 p x   r g b a ( 0 ,   0 ,   0 ,   0 . 1 5 )   ! i m p o r t a n t ;  
                 m a x - h e i g h t :   5 0 v h   ! i m p o r t a n t ;  
                 o v e r f l o w - y :   a u t o   ! i m p o r t a n t ;  
                 p a d d i n g - b o t t o m :   3 0 p x   ! i m p o r t a n t ;  
                 / *   S a f e   a r e a   * /  
         }  
  
         / *   H a n d l e / G r i p   I n d i c a t o r   * /  
         . s e l e c t o r - p o p u p : : b e f o r e   {  
                 c o n t e n t :   ' ' ;  
                 d i s p l a y :   b l o c k ;  
                 w i d t h :   4 0 p x ;  
                 h e i g h t :   4 p x ;  
                 b a c k g r o u n d :   # e 0 e 0 e 0 ;  
                 b o r d e r - r a d i u s :   2 p x ;  
                 m a r g i n :   1 0 p x   a u t o   1 5 p x   a u t o ;  
         }  
 }  
 