html, body {
    overscroll-behavior: none;
}

html::before {
    --desktop-text-opacity: 0.08;
    --desktop-line-opacity: 0.05;
    --desktop-font-size: 5vw;
    content: "MINDSTEEP \A \A CONFIDENȚIAL      ";    
    position: fixed;
    top: 50%;
    left: 50%;
    width: 200vw;
    height: 200vh;
    transform: translate(-50%, -50%) rotate(-30deg);    
    z-index: 1;    
    pointer-events: none; 
    display: flex;
    justify-content: center;
    align-items: center;    
    padding-right: 0;
    white-space: pre;   
    text-align: center;
    font-size: var(--desktop-font-size);
    color: rgba(255, 0, 0, var(--desktop-text-opacity)); 
    font-weight: 900;
    font-family: sans-serif;    
    background-image: repeating-linear-gradient(
      45deg,
      transparent,
      transparent 100px,
      rgba(255, 0, 0, var(--desktop-line-opacity)) 100px,
      rgba(255, 0, 0, var(--desktop-line-opacity)) 120px
    );
}

@media only screen and (max-width: 768px) {
    html::before {
        --desktop-text-opacity: 0.08; 
        --desktop-line-opacity: 0.05;
        --desktop-font-size: 14vw;
        padding-right: 0; 
    }
    
    body, html {
        touch-action: pan-x pan-y;
    }
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  line-height: 22px;
   background-color: rgb(243, 243, 243);
}


/* =========================================
   MATERIAL DESIGN NAV BUTTON
   ========================================= */
.navbttn-material {
    --md-green: #038a41;          
    --md-green-hover: #1c9554;    
    --md-green-active: #02602d;   
    
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;    
    border: 1px solid var(--md-green) !important; 
    border-radius: 4px !important;    
    box-shadow: 0 3px 1px -2px rgba(0,0,0,0.2), 
                0 2px 2px 0 rgba(0,0,0,0.14), 
                0 1px 5px 0 rgba(0,0,0,0.12) !important;
    display: inline-block !important;
    box-sizing: border-box !important;
    height: 56px !important;
    width: auto !important;
    min-width: 160px !important;    
    padding: 14px 23px !important;    
    font-size: 22px !important;
    font-family: 'Helvetica', 'Arial', sans-serif !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: normal !important;
    color: white !important;
    text-shadow: none !important;
    text-align: center !important;
    line-height: 26px !important;    
    background-color: var(--md-green) !important;
    background-image: none !important;
    cursor: pointer !important;
    position: relative !important;
    z-index: auto !important;
    margin: 0 !important;
    vertical-align: middle !important;
    transition: background-color 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease !important;    
    outline: none !important;
    overflow: visible !important;
    -webkit-text-size-adjust: 100%;
    transform: translateZ(0); 
}

.navbttn-material::-moz-focus-inner {
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

.navbttn-material:hover {
    background-color: var(--md-green-hover) !important;
    border-color: var(--md-green-hover) !important;
    background-image: none !important;
    color: white !important;
    opacity: 1 !important;
    
    box-shadow: 0 5px 5px -3px rgba(0,0,0,0.2), 
                0 8px 10px 1px rgba(0,0,0,0.14), 
                0 3px 14px 2px rgba(0,0,0,0.12) !important;
}

.navbttn-material:active {
    background-color: var(--md-green-active) !important;
    border-color: var(--md-green-active) !important;
    background-image: none !important;
    margin: 0 !important;
    transform: translateZ(0) !important;
    padding: 14px 23px !important;
    box-shadow: 0 2px 4px -1px rgba(0,0,0,0.2), 
                0 4px 5px 0 rgba(0,0,0,0.14), 
                0 1px 10px 0 rgba(0,0,0,0.12) !important;
    transition: none !important; 
}

@supports (-moz-appearance:none) {
    .navbttn-material:active {
        padding-top: 13px !important;
        padding-left: 22px !important;
        padding-bottom: 15px !important;  
        padding-right: 24px !important;   
    }
}

.navbttn-material:focus, 
.navbttn-material:focus-visible {
    outline: none !important;
    border: 1px solid var(--md-green) !important; 
}

/* =========================================
   DANGER VARIANT — for error/restart buttons
   ========================================= */
.navbttn-material.navbttn-material--danger {
    --md-green: #d50000;
    --md-green-hover: #e53935;
    --md-green-active: #b71c1c;
}

@media only screen and (max-width: 768px) {
    .navbttn-material--danger {
        font-size: 20px !important;
    }
    .sd-question {
        padding-bottom: 16px !important;
    }
}

/* BROWSER WARNING MODAL */
.bw-overlay {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 99999;
    display: flex; 
    justify-content: center; 
    align-items: center;
}

.bw-modal-glass {
    background: rgba(30, 30, 30, 0.70);
    border: 1px solid rgba(255,255,255,0.1); 
    box-shadow: 0 40px 80px rgba(0,0,0,0.6);
    padding: 40px 35px;
    border-radius: 24px;
    max-width: 550px;
    width: 90%;
    text-align: center;
    color: white;
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

.bw-glass-icon { 
    font-size: 50px; 
    margin-bottom: 40px; 
    display: block;
    text-shadow: 0 0 30px rgba(255, 50, 50, 0.5); 
}

.bw-glass-title { 
    font-size: 22px; 
    margin-bottom: 30px; 
    font-weight: 800; 
    color: #fff; 
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bw-glass-text { 
    font-size: 15px; 
    color: #e0e0e0; 
    margin-bottom: 25px; 
    line-height: 1.6;
    text-align: justify; 
}

.bw-glass-text p {
    margin-bottom: 12px;
    margin-top: 0;
}
.bw-glass-text p:last-child {
    margin-bottom: 0;
}

.bw-glass-list { 
    text-align: left; 
    background: rgba(255,255,255,0.05); 
    padding: 20px; 
    border-radius: 12px; 
    margin-bottom: 30px; 
}

.bw-glass-list div { 
    margin-bottom: 8px; 
    font-size: 14px; 
    color: #fff; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
}

.bw-glass-list div:last-child {
    margin-bottom: 0;
}

.bw-glass-btn {
    background: white; 
    color: black; 
    border: none; 
    padding: 16px 0; 
    width: 100%; 
    border-radius: 12px; 
    font-weight: 800; 
    font-size: 15px;
    cursor: pointer; 
    text-transform: uppercase;
    transition: 0.2s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

.bw-glass-btn:hover { 
    background: #f0f0f0; 
    transform: translateY(-2px);
}

.bw-glass-btn:active {
    transform: translateY(0);
}

/* =========================================
   GATED (DISABLED) NAV BUTTON STATE
   ========================================= */
.navbttn-material.btn-gated {
    background-color: #999 !important;
    border-color: #999 !important;
    cursor: not-allowed !important;
    opacity: 0.85 !important;
    box-shadow: none !important;
    pointer-events: none !important;
}
.navbttn-material.btn-gated:hover {
    background-color: #999 !important;
    border-color: #999 !important;
    box-shadow: none !important;
}

/* ============================================
   RESET BUTTON — STYLING Muted Teal (Teal 400)
   ============================================ */
.navbttn-material.btn-reset {
   --md-reset: #ff8f00 !important;     /* slightly less saturated */
    --md-reset-hover: #ffa726 !important;
    --md-reset-active: #e65100 !important;
    background-color: var(--md-reset) !important;
    border-color: var(--md-reset) !important;
}
.navbttn-material.btn-reset:hover {
    background-color: var(--md-reset-hover) !important;
    border-color: var(--md-reset-hover) !important;
}
.navbttn-material.btn-reset:active {
    background-color: var(--md-reset-active) !important;
    border-color: var(--md-reset-active) !important;
}

/* =========================================
   RESET BUTTON — DISABLED STATE
   ========================================= */
.navbttn-material.btn-reset.btn-reset-gated {
    background-color: #999 !important;
    border-color: #999 !important;
    cursor: not-allowed !important;
    opacity: 0.85 !important;
    box-shadow: none !important;
    pointer-events: none !important;
}
.navbttn-material.btn-reset.btn-reset-gated:hover {
    background-color: #999 !important;
    border-color: #999 !important;
    box-shadow: none !important;
}

/* =========================================
   NAV BAR LAYOUT — Responsive Flexbox
   ========================================= */
.sd-action-bar.sd-footer.sd-body__navigation {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 65px !important;
    flex-wrap: wrap !important;
    padding-top: 20px !important; /* adjust to your liking */
}

/* Wipe native SurveyJS auto-margins from all children */
.sd-action-bar.sd-footer.sd-body__navigation > * {
    margin: 0 !important; 
}

/* Force Flex Order: OK (left/top) and Reset (right/bottom) */
.sd-action-bar.sd-footer.sd-body__navigation .sv-action__content {
    order: 1 !important; /* Forces the Next/Complete button container to the left */
}
#btn-reset {
    order: 2 !important; /* Forces the custom Reset button to the right */
}

/* =========================================
   MOBILE — stack vertically, full-width
   ========================================= */
@media only screen and (max-width: 768px) {
    .sd-action-bar.sd-footer.sd-body__navigation {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 15px !important;
    }
    .sd-action-bar.sd-footer.sd-body__navigation > *,
    .sd-action-bar.sd-footer .navbttn-material,
    .sd-action-bar.sd-footer .sv-action,
    .sd-action-bar.sd-footer .sv-action__content {
        width: 100% !important;
        min-width: unset !important;
        box-sizing: border-box !important;
    }
}

/* Hide the checkbox decorator (the visible square box) */
.sd-checkbox__decorator {
    display: none !important;
}

/* Make the label a positioning context and add left padding for the badge */
.sd-selectbase__label {
    position: relative !important;
    padding-left: 38px !important;
    cursor: pointer;
}

/* Numbered badge styling */
.click-order-display {
    z-index: 2 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 30px !important;
    height: 30px !important;
    background-color: #038a41 !important;
    color: white !important;
    border-radius: 50% !important;
    font-size: 14px !important;
    font-weight: bold !important;
    visibility: hidden;
    position: absolute !important;
    left: 0px !important;
    top: 50% !important;
    margin: 0 !important;
    transform: translateY(-50%) !important;
}

.sd-body {
    padding-top: 18px !important; /* was 24px, adjust to your liking */
}

.sv-header__logo {
    justify-content: center !important;
}

.sd-root-modern__wrapper {
    position: relative;
    z-index: 2 !important;
}

.sd-progress {
    height: .3rem !important;
}

.sd-progress__bar {
    opacity: 1 !important;
}

.sd-element--with-frame {
    z-index: auto !important;
}

.sd-timer {
    bottom: 30px !important;
    right: 20px !important;    
    }

.sd-root-modern {
  letter-spacing: 0px; /* tighten spacing, adjust to taste */
}

.sd-selectbase__item {
  padding-top: 14px;    /* currently 12px */
  padding-bottom: 14px; /* currently 12px */
}

@media only screen and (min-width: 769px) {
    .sd-timer {
        bottom: 300px !important;
        right: 150px !important;
    }
}

/* =========================================
   TIMER PULSE — last 10 seconds warning
   ========================================= */
@keyframes timer-pulse {
    0%   { transform: scale(1);    border-color: rgba(255, 0, 0, 0.5); }
    50%  { transform: scale(1.08); border-color: rgba(255, 0, 0, 1); }
    100% { transform: scale(1);    border-color: rgba(255, 0, 0, 0.5); }
}

.sd-timer.timer-pulsing {
    animation: timer-pulse 1s ease-in-out infinite !important;
    border: 2px solid rgba(255, 0, 0, 0.5) !important;
    border-radius: 50% !important;
}

.sd-timer.timer-pulsing .sd-timer__text--major {
    color: #d32f2f !important;
    font-weight: 700 !important;
}

/* ========================================= */
/* INTRO/OUTRO TEXT STYLES                   */
/* ========================================= */
.welcome-title {
    margin-top: 0px;
}

.welcome-text {
    font-size: 1em;
    color: #333;
    line-height: 1.6;
    margin-bottom: 10px;
}

.welcome-highlight {
    color: #038a41;
    font-weight: 700 !important;
}

/* ========================================= */
/* 1. VISUAL CORE (SHARED STYLES)            */
/* ========================================= */

/* Default Settings (Used by SUCCESS CARD) */
:root {
    --page-top-offset: 15vh;
    --card-width: 380px;
    --card-height: 290px;
    --card-padding: 50px 30px 30px 30px; /* Top padding pushes icon down */
    --border-thickness: 3px;
    --border-radius: 20px;
    --icon-size: 4rem;
    --text-size-main: 22px;
    --icon-text-gap: 35px;
    --text-gap: 10px;
}

@property --border-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

/* --- The Glass Box Container --- */
.glass-card {
    position: relative;
    z-index: 10000;    
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);    
    border-radius: var(--border-radius); 
    padding: var(--card-padding);    
    text-align: center;
    display: flex; flex-direction: column; align-items: center; 
    justify-content: flex-start; /* Anchors content to top padding */    
    gap: var(--icon-text-gap);    
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    transition: box-shadow 0.5s ease;    
    width: var(--card-width);
    min-height: var(--card-height);    
    box-sizing: border-box;
}

/* The Spinning Border */
.glass-card::before {
    content: "";
    position: absolute;
    inset: 0; 
    border-radius: var(--border-radius); 
    padding: var(--border-thickness); 
    background: conic-gradient(
        from var(--border-angle), 
        transparent 20%, 
        rgba(3, 138, 65, 0.2) 80%, 
        #038a41 100%
    );
    -webkit-mask: 
       linear-gradient(#fff 0 0) content-box, 
       linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: spin-gradient 5s linear infinite;
    pointer-events: none;
}

/* Text Styling */
.text-content {
    font-size: var(--text-size-main) !important;
    color: #333; line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    display: flex; flex-direction: column; align-items: center;
    width: 100%;
}

.glass-card .text-content,
.glass-card .text-content strong,
.glass-card #main-text strong,
.glass-card #main-text {
    font-size: var(--text-size-main) !important;
    line-height: 1.4 !important;
}

#main-text {
    transition: opacity 0.5s ease;
    display: flex; flex-direction: column; align-items: center;
}

.warning-text {
    font-size: 0.80em !important; 
    color: #555; font-weight: normal;
    margin-top: var(--text-gap); 
}

#sub-text {
    font-size: 0.80em !important; 
    color: #555; 
    opacity: 0; transform: translateY(10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    margin-top: var(--text-gap); display: block;
}

/* Success State Styles */
.reveal-redirect #sub-text { opacity: 1; transform: translateY(0); }
.glass-card.icon-success { box-shadow: 0 20px 50px rgba(3, 138, 65, 0.25); }
.glass-card.icon-success::before { animation: none; background: #038a41; transition: background 0.3s ease; }

/* Icon Styling */
.neon-icon {
    font-size: var(--icon-size); color: #038a41;
    animation: neon-flicker 2s infinite alternate;
    transition: transform 0.5s ease, color 0.5s ease;
    transform-origin: center center;
}
.icon-success .neon-icon {
    animation: none; transform: scale(1.1);
    text-shadow: 0 0 15px rgba(3, 138, 65, 0.6);
}

/* Animations */
@keyframes spin-gradient {
    0% { --border-angle: 0deg; }
    100% { --border-angle: 360deg; }
}
@keyframes neon-flicker {
    0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
        text-shadow: 0 0 5px rgba(3, 138, 65, 0.4), 0 0 15px rgba(3, 138, 65, 0.2);
        opacity: 1; transform: scale(1);
    }
    20%, 24%, 55% { text-shadow: none; opacity: 0.5; transform: scale(0.98); }
}

/* =========================================
   HARD-DRIVE LED FLICKER
   Used by the spinner icon inside disabled save buttons
   (.custom-spin-icon). Pairs with bi-database-fill-up.
   The icon stays still — only opacity flickers irregularly
   to mimic an HDD activity LED during I/O.
   ========================================= */
.custom-spin-icon {
    display: inline-block;
    animation: hdd-led-flicker 4s infinite;
    vertical-align: middle;
    color: white !important;
}

@keyframes hdd-led-flicker {
    /* Bright phase — most of the cycle "on" */
    0%, 8%, 14%, 22%, 30%, 38%, 50%, 62%, 78%, 100% {
        opacity: 1;
    }
    /* Quick irregular dims — short bursts of "off" */
    10%, 18%, 26%, 34%, 42%, 54%, 66%, 82% {
        opacity: 0.35;
    }
    /* One slightly longer "idle" pause */
    70%, 74% {
        opacity: 0.55;
    }
}

@media (max-width: 450px) { .glass-card { width: 90%; } }


/* ========================================= */
/* 2. LOADING SCREEN WRAPPER                 */
/* ========================================= */
.loading-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100vh;
    background: radial-gradient(circle at 50% 50%, #f0fdf4, #ffffff);
    display: flex; justify-content: center; align-items: flex-start;
    padding-top: var(--page-top-offset); 
    z-index: 20000; 
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
.loading-overlay.fade-out { opacity: 0; visibility: hidden; }


/* ========================================= */
/* 3. INDEPENDENT LOADING CARD SETTINGS      */
/* ========================================= */
/* Edit THESE numbers to change ONLY the Loading Screen */

.loading-overlay .glass-card {
    /* Dimensions */
    --loading-width: 350px;
    --loading-height: 230px;
    
    /* Padding (Top, Right, Bottom, Left) - Top moves icon down */
    --loading-padding: 40px 30px 30px 30px; 
    
    /* Spacing between Icon and Text */
    --loading-gap: 37px;

    /* --- DO NOT EDIT BELOW THIS LINE --- */
    width: var(--loading-width) !important;
    min-height: var(--loading-height) !important;
    padding: var(--loading-padding) !important;
    gap: var(--loading-gap) !important;
}

/* --- FIREFOX VISUAL CORRECTION --- */
@supports (-moz-appearance:none) {
    html::before {
        --desktop-text-opacity: 0.12; 
        --desktop-line-opacity: 0.08; 
    }
.sd-progress__bar {
    opacity: 1 !important;
}
}