:root {
    --screen-width: 1080px;
    --screen-height: 1920px
}

body {
    margin: 0;
    font-family: Inter, sans-serif;
    background-color: black
}

/* Instrument screen is a fixed-resolution mockup (--screen-width x --screen-height)
   scaled uniformly via --instr-scale (set in c950_set_solvents.jinja.html from
   window.innerHeight) so it always fills the viewport's full height while keeping
   its aspect ratio - everything inside keeps using its original px layout, it just
   gets rendered smaller/larger as a whole. Centered horizontally via auto margins;
   left/right may overflow (scrollable) on viewports narrower than the scaled width. */
.instr-screen {
    position: relative;
    background-color: #F5F5F5;
    width: var(--screen-width);
    height: var(--screen-height);
    margin: 0 auto;
    transform: scale(var(--instr-scale, 1));
    transform-origin: top center;
}

button {
    border: none;
}

button, .button {
    height: 40px;
    padding: 8px;
    border-radius: 4px;

    display: flex;
    align-items: center;  
    justify-content: center;
}

.button-primary {
    color: white;
    background: #64B445;
}

.button-secondary {
    color: white;
    background: gray;
}

/* Bigger tap target than the default .button size (40px/content-width) - this is the
   primary confirmation action on the chemical info popup, on a touchscreen instrument. */
.ok-button {
    height: 60px;
    min-width: 10vw;
}


.lines-grid {
    display: grid;
  
    /* 1 header column + N dynamic columns */
    grid-template-columns: 150px repeat(4, 1fr);
  
    row-gap: 40px;
    column-gap: 40px;
  
    background: white;
    padding: 20px;
  }
  
  .header-cell {
    font-weight: 500;
    text-align: left;
  }
  
  .cell {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .action-row {
    display: flex;
    flex-direction: row;   /* horizontal */
    gap: 2px;
    justify-content: center;
  }

.play-button {
    width:84px;
    height:84px;
    border-radius:50px;
    background: #B7DCA9;

    display: flex;
    align-items: center;  
    justify-content: center;

    box-shadow: 10px;
    pointer-events: none
}

.play-button-active {
    background: #64B445 ;
    pointer-events: auto
}
  
.solvent-action-button {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    background: #E5E5E5;

    display: flex;
    align-items: center;  
    justify-content: center;
}

.demo-clickable {
    outline: 2px #FD31CD solid;
    pointer-events: auto
}

.info-popup-overlay {
    position: absolute;
    inset: 0;
    visibility: hidden;

    display: flex;
    justify-content: center;
    /* stretch (the flex default), not flex-start - .info-popup-box has no height of its
       own, so it fills exactly the space this padding leaves. Using vh here instead
       wouldn't work: .instr-screen (this overlay's actual containing block) is a fixed
       1080x1920 mockup rendered at a CSS transform: scale() - vh is relative to the real
       browser viewport, not that scaled coordinate space, so it under/over-shoots
       depending on window size instead of tracking the mockup's own size. */
    padding: 100px 0 40px;     /* top offset, bottom margin */

    background: #FFFFFFD0;
    z-index: 1100;
}

.info-popup-box {
    width: 75%;
    background: white;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 10px 10px 20px rgba(0,0,0,0.5);
    overflow-y: auto;
}

/* Instant tap feedback on every button, independent of any network call - addresses the
   general "laggy when pressing buttons" feel even where there's no request in flight. */
button:active, .demo-clickable:active, .play-button-active:active {
    transform: scale(0.94);
    opacity: 0.85;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.spinner {
    width: 48px;
    height: 48px;
    border: 5px solid #E5E5E5;
    border-top-color: #64B445;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Overlay shown while a slow request is in flight (scan lookup / OK / Prime / Trash) -
   sits above .info-popup-box so the spinner itself is always visible regardless of
   what's underneath. Transparent background on purpose: the result popups (e.g.
   inventory_sync_result.jinja.html's "Signals inventory updated" message) swap into the
   same #solvent-info this overlay sits on top of, and a solid backdrop here would dim/
   hide that result right as it appears (worst during the 200ms opacity fade-out htmx's
   own injected .htmx-indicator CSS applies, and before the ok-sync-status auto-close
   timer fires). Only opacity is handled by that injected CSS - pointer-events and layout
   are ours to control so a hidden spinner never swallows clicks meant for the content
   underneath. */
.spinner-overlay {
    position: absolute;
    inset: 0;
    z-index: 1150;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.htmx-request.spinner-overlay {
    pointer-events: auto;
}

.popup-sticky-footer {
    position: sticky;
    bottom: -10px;
    /* Cancel out .info-popup-box's own 10px padding so this reaches the box's real
       edges and fully covers content scrolling underneath it. */
    margin: 20px -10px -10px -10px;
    padding: 10px;
    background: white;
    display: flex;
    justify-content: flex-end;
    box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.08);
}

.demo-notice {
    background: #FFF4E5;
    border: 1px solid #F5A623;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    color: #7A4B00;
    font-size: 0.9em;
}

.demo-notice b {
    display: block;
    margin-bottom: 4px;
}

/* Inventory list isn't wrapped in .instr-screen's own light panel like the main
   screen - it sits directly on <body>'s black background, so its own text needs an
   explicit color. Scoped to this page (not a bare `body` rule) so it doesn't flip
   the main screen's text, which relies on the default black-on-.instr-screen's-
   light-grey look. */
.inventory-page {
    color: white;
}


.nav-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    
    width:var(--screen-width);
    height: 84px;
    
    display: flex;         
    flex-direction: row;    
    
    background: white;
    border-top: 1px solid #E5E5E5;
    }
    
    .nav-item {
    flex: 1;                 
    display: flex;
    flex-direction: column;  
    justify-content: center;
    align-items: center;
    }
    

.nav-divider {
    width: 1px;
    background: #E5E5E5;
}

.nav-text {
    font-size: 18px;
    font-family: Inter, sans-serif;
    font-weight: 300;
    line-height: 24px;
    letter-spacing: 0.5px;
    color: #1C1847;
    text-align: center;
    width: 100%;
}

.nav-item.active {
    border-bottom: 4px solid #64B445;
}

.nav-item.active .nav-text {
    color: #64B445;
}

.nav-icon {
    width: 24px;
    height: 24px;
    position: relative;
}


.start-page {
    position: relative;
    width: 100%;
    max-width: 1448px;
    margin: 0 auto;
}

.start-page-image {
    display: block;
    width: 100%;
    height: auto;
}

.start-page-hotspot {
    position: absolute;
    box-sizing: border-box;
    border: 3px solid #FD31CD;
    border-radius: 4px;
    background: rgba(253, 49, 205, 0.08);

    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.start-page-hotspot:hover {
    background: rgba(253, 49, 205, 0.2);
}

.start-page-hotspot-label {
    transform: translateY(50%);
    background: #FD31CD;
    color: white;
    font-family: Inter, sans-serif;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    padding: 4px 10px;
    border-radius: 4px;
}

