/* ========================================
   GENIUS LabAgent - Main Stylesheet
   Extracted from index.html + Improvements
   ======================================== */

/* ========================================
   1. BASE STYLES
   ======================================== */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background: #f8f8f8;
    color: #333;
}

.app-wrapper {
    display: flex;
    gap: 20px;
    padding: 20px;
    align-items: flex-start;
    max-width: 1800px;
    margin: 0 auto;
    box-sizing: border-box;
}

.simulation-content {
    flex: 1 1 0;
    min-width: 0;
}

.right-panel {
    width: 400px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
    height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    background: #f0f2f5;
    border-radius: 8px;
    overflow: hidden;
    border-left: 1px solid #e0e0e0;
}

.chatbot-container {
    flex: 1 1 0;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
    position: relative;
}

.chatbot-container > * {
    height: 100% !important;
    max-height: 100% !important;
    overflow: hidden !important;
}

.main-container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

/* ========================================
   2. NAVIGATION
   ======================================== */
.nav-menu {
    width: 220px;
    flex-shrink: 0;
    background: #282828;
    color: white;
    border-radius: 8px;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    height: fit-content;
    position: sticky;
    top: 0;
}

.nav-menu h2 {
    text-align: center;
    border-bottom: 1px solid #444;
    padding-bottom: 15px;
    margin-top: 0;
}


.nav-button {
    display: block;
    width: 100%;
    padding: 15px;
    margin-bottom: 10px;
    border: none;
    border-radius: 8px;
    background-color: transparent;
    color: white;
    cursor: pointer;
    font-size: 16px;
    text-align: left;
    transition: background-color 0.3s, transform 0.2s;
}

.nav-prev-next {
    display: flex;
    gap: 6px;
    padding-top: 10px;
    border-top: 1px solid #444;
}

.nav-prev-next .nav-arrow-btn {
    flex: 1;
    justify-content: center;
    font-size: 13px;
    padding: 8px 4px;
}

.nav-button.active {
    background-color: #c8102e;
    font-weight: bold;
}

.nav-button:hover:not(.active):not(:disabled) {
    background-color: #3a3a3a;
    transform: translateX(5px);
}

.nav-button:disabled,
.nav-button.nav-locked {
    background-color: transparent;
    color: #777;
    cursor: not-allowed;
    transform: none;
    border: 1px solid #444;
}

.nav-button:hover.nav-locked {
    background-color: transparent;
    transform: none;
}

.nav-spacer {
    flex-grow: 1;
}

/* Prev/Next arrow buttons */
.nav-arrow-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 16px;
    background-color: #c8102e;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-arrow-btn:hover:not(:disabled) {
    background-color: #a80d24;
}

.nav-arrow-btn:disabled,
.nav-arrow-btn.nav-locked {
    background-color: #555;
    color: #888;
    cursor: not-allowed;
}

.nav-arrow-btn:hover.nav-locked {
    background-color: #555;
}

.nav-arrow-btn .arrow {
    font-size: 1.1em;
}

/* ========================================
   3. CONTENT AREA
   ======================================== */
.content-area {
    flex: 1 1 0;
    min-width: 0;
    overflow-y: auto;
    overflow-x: hidden;
    background: #f5f5f5;
    border-radius: 8px;
}

.page {
    display: none;
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin: 0;
    box-sizing: border-box;
}

.page.active {
    display: block;
}

h1, h2, h3 {
    color: #1a1a1a;
}

/* ========================================
   PAGE TYPOGRAPHY HIERARCHY (steps 1-5)
   ======================================== */
/* Level 1: Page/Step Title */
#research-question h1,
#experiment-design h1,
#simulation-intro h1,
#data-collection h1,
#data-analysis h1 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 8px;
}

/* Level 2: Section header (e.g. "Analysis Questions") */
#data-analysis h3 {
    font-size: 16px;
    font-weight: 500;
    color: #555;
    margin-top: 24px;
    margin-bottom: 12px;
}

/* Level 3: Analysis question text (the numbered questions) */
#data-analysis .analysis-question {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

/* IMPROVEMENT: Center welcome message content */
.welcome-message {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.welcome-message p {
    text-align: left;
    max-width: 900px;
}

.instructions ol {
    line-height: 1.8;
    font-size: 16px;
    background: #f9f9f9;
    padding: 20px 20px 20px 40px;
    border-radius: 10px;
    border-left: 5px solid #c8102e;
}

/* ========================================
   4. FORMS & INPUTS
   ======================================== */
textarea {
    width: 100%;
    min-height: 100px;
    padding: 10px;
    font-size: 16px;
    border-radius: 8px;
    border: 1px solid #ccc;
    margin-top: 10px;
    box-sizing: border-box;
    resize: vertical;
    background-color: #fff !important;
    color: #111 !important;
}

textarea:read-only {
    background-color: #f5f5f5 !important;
    color: #555 !important;
}

.dynamic-list-container .list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.dynamic-list-container input[type="text"] {
    flex-grow: 1;
    padding: 10px 12px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #fff !important;
    color: #111 !important;
}

.dynamic-list-container input[type="text"]:read-only {
    background-color: #f5f5f5 !important;
    border-color: #ddd;
    color: #555 !important;
}

.action-btn, .remove-btn, .add-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    font-weight: bold;
    flex-shrink: 0;
}

.action-btn.save { background-color: #c8102e; }
.action-btn.change { background-color: #5a5a5a; }
.action-btn.next { background-color: #3498db; }
.action-btn.next:hover { background-color: #2980b9; }

.remove-btn { background-color: #c8102e; }
.add-btn {
    background-color: #5a5a5a;
    margin-top: 10px;
    width: 100%;
    padding: 10px;
}

.btn-download {
    background-color: #5a5a5a;
    margin-top: 20px;
    padding: 12px 25px;
    border-radius: 5px;
    color: white;
    border: none;
    font-weight: bold;
    cursor: pointer;
}

.textarea-container {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
}

.textarea-container textarea {
    margin-top: 0;
}

.action-buttons-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex-shrink: 0;
}

/* ========================================
   TEXTAREA BLOCK — column layout with button at bottom-right
   (used in analysis blocks, step 5)
   ======================================== */
.textarea-block {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.textarea-block textarea {
    margin-top: 0;
}

/* Bottom-right button row (inside textarea-block for step 5) */
.submit-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 6px;
}

/* Bottom-right button row at the block level (steps 1 & 2) */
.block-submit-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

/* Inactive (faint) button state — user hasn't typed yet */
.btn-inactive {
    opacity: 0.4;
    cursor: default;
}

.table-container {
    overflow-x: auto;
    margin-top: 20px;
}

/* ========================================
   5. EXPERIMENT DESIGN BLOCKS
   ======================================== */
.experiment-design-block, .rq-block {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    background-color: #fafafa;
}

.experiment-design-block legend {
    font-weight: bold;
    font-size: 1.2em;
    color: #1a1a1a;
    padding: 0 10px;
}

.hypothesis-container, .rq-container {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed #ccc;
}

.rq-block .rq-container {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
}

.hypothesis-container p, .rq-container p {
    margin-top: 0;
    margin-bottom: 5px;
    font-weight: bold;
}

/* Variable Section Styling */
.variable-section {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-left: 6px solid #ccc;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

/* Level 4: Variable section labels and RQ/Hypothesis sub-labels */
.variable-section h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
    font-size: 14px;
    font-weight: bold;
}

.hypothesis-container p,
.rq-container p {
    font-size: 14px;
    font-weight: 600;
}

/* Distinct Colors for IV, DV, CV */
.var-section-iv { border-left-color: #c8102e; }
.var-section-dv { border-left-color: #3498db; }
.var-section-cv { border-left-color: #27ae60; }

/* ========================================
   6. CHATBOT OVERRIDES
   ======================================== */
.chatbot-container > div {
    background-color: transparent !important;
    box-shadow: none !important;
    height: 100% !important;
    max-height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

/* Ensure messages area scrolls, not the whole container */
.chatbot-container [class*="overflow-y-auto"] {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    max-height: none !important;
}

/* Input area stays fixed at bottom */
.chatbot-container form,
.chatbot-container [class*="border-t"] {
    flex-shrink: 0 !important;
}

/* User chat bubble */
.chatbot-container div[class*="bg-blue-600"] {
    background-color: #c8102e !important;
}

/* Send button */
.chatbot-container button[class*="bg-blue-600"] {
    background-color: #c8102e !important;
}

.chatbot-container button[class*="hover\\:bg-blue-700"]:hover {
    background-color: #a80d24 !important;
}

/* AI Icon */
.chatbot-container div[class*="bg-blue-500"] {
    background-color: #5a5a5a !important;
}

/* Input focus colors */
.chatbot-container input[class*="focus\\:ring-blue-500"]:focus {
    --tw-ring-color: #c8102e !important;
}

.chatbot-container input[class*="focus\\:border-blue-500"]:focus {
    border-color: #c8102e !important;
}

/* ========================================
   7. SIMULATION PREVIEW
   ======================================== */
.sim-preview-wrapper {
    position: relative;
    width: 422px;
    max-width: 95%;
    margin: 24px auto;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    pointer-events: none;
    user-select: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    background: #fff;
    height: 337px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#home-sim-preview {
    transform: scale(0.45);
    transform-origin: center center;
    width: 222%;
}

#home-sim-preview .simulation-area {
    overflow: visible !important;
}

.sim-preview-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-25deg);
    font-size: 2rem;
    font-weight: 900;
    color: rgba(0, 0, 0, 0.08);
    border: 4px solid rgba(0,0,0,0.08);
    padding: 10px 30px;
    border-radius: 15px;
    z-index: 100;
    white-space: nowrap;
}

/* Compact typography for Home Page */
#home h1 { font-size: 1.2rem; margin-bottom: 12px; text-align: center; }
#home p { font-size: 1rem !important; margin: 10px auto !important; line-height: 1.5 !important; }
#home h2 { font-size: 1.1rem; margin-top: 10px; margin-bottom: 10px; }
#home .instructions ol { font-size: 0.90rem; line-height: 1; padding: 15px 15px 15px 35px; }
#home .instructions li { margin-bottom: 8px; }

/* ========================================
   8. REPORT BUTTON
   ======================================== */
.report-btn-container {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #eee;
    text-align: center;
}

.btn-download-report {
    background-color: #27ae60;
    color: white;
    font-size: 18px;
    padding: 15px 30px;
    border-radius: 8px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s, background-color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-download-report:hover {
    background-color: #219150;
    transform: translateY(-2px);
}

.btn-download-report:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ========================================
   9. EMBEDDED MODE STYLES (?embedded=true)
   Full interface optimized for iframe usage
   Navigation bar HORIZONTAL FIXED at TOP
   ======================================== */

/* Base embedded styles */
html.embedded,
body.embedded {
    background: #f5f5f5 !important;
    overflow: hidden !important;
    height: 100vh !important;
    width: 100vw !important;
    margin: 0 !important;
    padding: 0 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
}

/* ---- NAVIGATION MENU (fixed horizontal at top) ---- */
body.embedded .nav-menu {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    z-index: 1000 !important;
    width: 100% !important;
    min-height: auto !important;
    height: auto !important;
    padding: 10px 16px !important;
    border-radius: 0 !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    background: linear-gradient(to bottom, #2d2d2d, #222) !important;
    border-bottom: 1px solid #444 !important;
    display: flex !important;
    flex-shrink: 0 !important;
}

body.embedded .nav-menu h2 {
    display: none;
}

body.embedded .nav-button {
    flex: 0 0 auto;
    width: auto;
    padding: 8px 14px;
    margin: 0;
    font-size: 14px;
    border-radius: 4px;
    white-space: nowrap;
}

body.embedded .nav-button.active {
    background-color: #c8102e;
}

body.embedded .nav-button:hover:not(.active):not(:disabled) {
    transform: none;
    background-color: #404040;
}

body.embedded .nav-spacer {
    display: none;
}

body.embedded .nav-prev-next {
    border-top: none;
    padding-top: 0;
    gap: 4px;
    flex-shrink: 0;
}

body.embedded .nav-prev-next .nav-arrow-btn {
    flex: 0 0 auto;
    font-size: 13px;
    padding: 8px 14px;
}

/* Prev/Next buttons in embedded */
body.embedded .nav-arrow-btn {
    padding: 8px 14px;
    font-size: 13px;
}

/* ---- APP WRAPPER (embedded) - Using CSS Grid ---- */
body.embedded .app-wrapper {
    display: grid !important;
    grid-template-columns: 1fr 30% !important;
    grid-template-rows: 100% !important;
    padding: 0 !important;
    gap: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    margin-top: 52px !important;
    height: calc(100vh - 52px) !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

/* ---- SIMULATION CONTENT (embedded) ---- */
body.embedded .simulation-content {
    grid-column: 1 !important;
    grid-row: 1 !important;
    position: relative !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 100% !important;
    min-height: 0 !important;
}

body.embedded .main-container {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ---- CONTENT AREA (embedded) ---- */
body.embedded .content-area {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #f5f5f5 !important;
    box-sizing: border-box !important;
    border-radius: 0 !important;
}


body.embedded .page {
    padding: 16px !important;
    border-radius: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

body.embedded .page.active {
    display: block;
    height: auto;
    overflow: visible;
}

/* IMPROVED: Larger, more legible text */
body.embedded .page h1 {
    font-size: 1.15rem;
    margin-bottom: 10px;
}

body.embedded .page h2 {
    font-size: 1.05rem;
}

body.embedded .page p {
    font-size: 0.95rem;
    line-height: 1.6;
}

body.embedded .instructions ol {
    font-size: 0.9rem;
    padding: 12px 12px 12px 28px;
    line-height: 1.6;
}

body.embedded textarea {
    min-height: 80px;
    font-size: 14px;
    padding: 10px;
}

/* IMPROVED: Simulation preview for embedded */
body.embedded .sim-preview-wrapper {
    max-width: 100%;
    width: 320px;
    height: 250px;
    margin: 16px auto;
    overflow: hidden;
    position: relative;
}

/* The simulation has min-width: 800px internally, so we position absolutely */
body.embedded #home-sim-preview {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.32);
    transform-origin: center center;
    width: 900px;  /* Fixed width to match simulation content */
}

/* Screenshot Modal - ensure it displays correctly in embedded mode */
body.embedded #screenshotModal,
body.embedded .modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.embedded #screenshotModal[style*="display: none"] {
    display: none !important;
}

body.embedded #screenshotModal .modal-content,
body.embedded .modal img {
    max-width: 90% !important;
    max-height: 90% !important;
    margin: auto !important;
    object-fit: contain !important;
}

/* ---- RIGHT PANEL / CHAT (embedded) - IMPROVED WIDTH ---- */
body.embedded .right-panel {
    grid-column: 2 !important;
    grid-row: 1 !important;
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    border-radius: 0 !important;
    background: #fff !important;
    border-left: 1px solid #e0e0e0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    top: auto !important;
}

body.embedded .chatbot-container {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Force chatbot inner container to fill and not grow */
body.embedded .chatbot-container > div,
body.embedded .chatbot-container > div[class*="flex"] {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    margin: 0 !important;
}

/* Chat messages area - must scroll internally */
body.embedded .chatbot-container [class*="overflow-y-auto"],
body.embedded .chatbot-container [class*="flex-1"] {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
}

/* Input area stays at bottom */
body.embedded .chatbot-container [class*="border-t"] {
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
}

/* Touch-friendly scrolling */
body.embedded .chatbot-container [class*="overflow-y-auto"],
body.embedded .content-area {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* Prevent text selection on touch devices */
body.embedded button:not(textarea):not(input) {
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

/* ========================================
   10. RESPONSIVE BREAKPOINTS
   ======================================== */

/* ---- LARGE SCREENS (> 1200px) ---- */
@media (min-width: 1200px) {
    body.embedded .app-wrapper {
        grid-template-columns: 1fr 320px !important;
    }

    body.embedded .page {
        padding: 20px !important;
    }
}

/* ---- MEDIUM SCREENS (< 900px) ---- */
@media (max-width: 900px) {
    body.embedded .app-wrapper {
        grid-template-columns: 100% !important;
        grid-template-rows: 1fr 220px !important;
    }

    body.embedded .simulation-content {
        grid-column: 1 !important;
        grid-row: 1 !important;
    }

    body.embedded .right-panel {
        grid-column: 1 !important;
        grid-row: 2 !important;
        width: 100% !important;
        height: 220px !important;
        border-left: none !important;
        border-top: 1px solid #e0e0e0 !important;
    }

    /* Hide label, show only arrow on medium screens */
    body.embedded .nav-arrow-btn .label {
        display: none;
    }
}

/* ---- SMALL SCREENS (phones < 600px) ---- */
@media (max-width: 600px) {
    body.embedded .nav-menu {
        padding: 6px 10px !important;
        gap: 4px !important;
    }

    body.embedded .nav-button {
        padding: 5px 8px;
        font-size: 11px;
    }

    body.embedded .nav-arrow-btn {
        padding: 6px 10px;
        font-size: 12px;
    }

    body.embedded .app-wrapper {
        padding-top: 42px;
    }

    body.embedded .content-area {
        padding: 8px;
    }

    body.embedded .page {
        padding: 12px;
    }

    body.embedded .page h1 {
        font-size: 1rem;
    }

    body.embedded .page p,
    body.embedded .instructions ol {
        font-size: 0.85rem;
    }

    body.embedded .right-panel {
        height: 180px;
    }

    body.embedded textarea {
        min-height: 60px;
        font-size: 14px;
    }

    /* Larger touch targets */
    body.embedded .action-btn,
    body.embedded .add-btn,
    body.embedded .remove-btn {
        padding: 8px 12px;
        font-size: 12px;
        min-height: 40px;
    }

    /* Hide simulation preview on small screens */
    body.embedded .sim-preview-wrapper {
        display: none;
    }
}

/* ---- VERY SMALL SCREENS (< 420px) ---- */
@media (max-width: 420px) {
    body.embedded .nav-button {
        padding: 4px 6px;
        font-size: 10px;
    }

    body.embedded .nav-arrow-btn {
        padding: 5px 8px;
    }

    body.embedded .app-wrapper {
        padding-top: 38px;
    }

    body.embedded .right-panel {
        height: 160px;
    }
}

/* Safe area insets for notched devices */
@supports (padding: env(safe-area-inset-bottom)) {
    body.embedded .nav-menu {
        padding-left: max(12px, env(safe-area-inset-left)) !important;
        padding-right: max(12px, env(safe-area-inset-right)) !important;
        padding-top: max(6px, env(safe-area-inset-top)) !important;
    }
    body.embedded .content-area {
        padding-left: max(10px, env(safe-area-inset-left));
        padding-right: max(10px, env(safe-area-inset-right));
    }
    body.embedded .right-panel {
        padding-bottom: env(safe-area-inset-bottom);
    }
}
