@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap');

/* -----------------------------------
   GLOBAL FONT
----------------------------------- */
* {
    font-family: "Montserrat", sans-serif;
    box-sizing: border-box;
}

/* -----------------------------------
   GLOBAL PAGE
----------------------------------- */
html, body {
    background-color: #542D54; /* fallback */
    background-image: url("/assets/MockUpMachine-BG.png");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;

    color: #FFFFFF;
    margin: 0;
    padding: 0;
}

body {
    display: block;          /* NOT flex â€“ lets white boxes center via margin:auto */
    padding: 40px;
}

/* -----------------------------------
   HEADER
----------------------------------- */
.header-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 5px;
}

.header-image {
    width: 100%;
    max-width: 1100px;
    margin-bottom: 30px;
}

/* Header subtext */
.header-subtext {
    width: 100%;
    max-width: 1200px;
    margin: -18px auto 24px auto;
    text-align: center;
    color: #FFFFFF;
}

.header-subtext-primary {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 4px;
}

.header-subtext-secondary {
    font-weight: 600;
    font-size: 14px;
    opacity: 0.95;
}

/* -----------------------------------
   MAIN WHITE SPEC SECTION
----------------------------------- */
.spec-section {
    width: 100%;
    max-width: 1200px;
    background: #FFFFFF;
    border-radius: 12px;
    border: 3px solid #D7DF23;
    padding: 20px 32px;

    margin: 0 auto 24px auto;
    position: relative;
}

/* Inner wrapper */
.section-inner {
    width: 100%;
    max-width: 1136px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

/* -----------------------------------
   DROPDOWN (base style used by select + search input)
----------------------------------- */
.dropdown {
    width: 100%;
    padding: 12px 14px;
    border-radius: 8px;
    border: 2px solid #D7DF23;
    background: #FFFFFF;
    color: #542D54;
    font-size: 16px;
    font-weight: 600;
}

/* -----------------------------------
   SEARCHABLE SPEC PICKER (NEW)
----------------------------------- */
.spec-picker {
    width: 100%;
    position: relative; /* anchors .spec-options dropdown */
}

/* The hint text under the search input */
.spec-hint {
    width: 100%;
    margin-top: 6px;
    color: #542D54;
    font-size: 13px;
    font-weight: 600;
    opacity: 0.9;
}

/* Filtered options list */
.spec-options {
    width: 100%;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background: #FFFFFF;
    border: 2px solid #D7DF23;
    border-radius: 10px;
    overflow: hidden;
    z-index: 50;
    max-height: 280px;
    overflow-y: auto;
}

/* Each row in options list */
.spec-option-row {
    padding: 12px 14px;
    color: #542D54;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    background: #FFFFFF;
}

.spec-option-row:hover {
    background: #F2F2F2;
}

/* Empty state row */
.spec-option-empty {
    cursor: default;
    opacity: 0.75;
}

/* -----------------------------------
   DROP AREA
----------------------------------- */
.drop-area {
    width: 100%;
    border: 3px dashed #542D54;
    border-radius: 12px;
    background: #F7F7F7;
    padding: 24px 12px;
    color: #542D54;
    font-size: 15px;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.drop-area.drag-over {
    background: #ECECEC;
    border-color: #D7DF23;
}

.file-input {
    display: none;
}

/* -----------------------------------
   UPLOAD CONFIRMATION + PREVIEW
----------------------------------- */
.upload-confirm {
    width: 100%;
    color: #542D54;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
}

.upload-confirm.hidden {
    display: none;
}

.upload-confirm-text {
    margin-top: 10px;
}

/* Preview grid */
.upload-preview {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.upload-item {
    width: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.upload-thumb {
    width: 120px;
    height: 80px;
    border: 2px solid #D7DF23;
    border-radius: 10px;
    background: #FFFFFF;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-name {
    width: 100%;
    font-size: 12px;
    font-weight: 600;
    color: #542D54;
    word-break: break-word;
    text-align: center;
}

/* -----------------------------------
   INLINE SECTION RESULTS
----------------------------------- */
.section-results {
    width: 100%;
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.result-box {
    border: 3px solid #D7DF23;
    border-radius: 12px;
    padding: 16px 20px;
    background: #FFFFFF;
    color: #542D54;
    font-size: 14px;
    line-height: 1.45;
}

.result-pass strong {
    color: #2A7A34;
}

.result-fail strong {
    color: #B00020;
}

.result-fail ul {
    margin: 6px 0 0 0;
    padding-left: 20px;
}

.result-message {
    margin-top: 4px;
    font-size: 14px;
}

/* -----------------------------------
   BUTTONS
----------------------------------- */
.gawk-button {
    background: #D7DF23;
    color: #542D54;
    padding: 14px 32px;
    border-radius: 999px;
    border: none;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: 0.2s ease;
}

.gawk-button:hover {
    background: #C8D51E;
}

.gawk-button.disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* Pink add-size button */
.secondary-button {
    background: #C99CCA;
    color: #542D54;
}

.secondary-button:hover {
    background: #B88BBE;
}

/* Reset button */
.reset-button {
    background: #FFFFFF;
    color: #542D54;
    border: 2px solid #D7DF23;
    margin: 18px auto 40px auto;
    display: block;
}

.reset-button:hover {
    background: #F2F2F2;
}

/* -----------------------------------
   PER-SECTION UPLOAD OVERLAY
----------------------------------- */
.upload-overlay {
    position: absolute;
    inset: 0;
    background: rgba(84,45,84,0.08);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.upload-overlay.hidden {
    display: none;
}

/* -----------------------------------
   GLOBAL SPEC-CHECK OVERLAY
----------------------------------- */
.spec-check-overlay {
    position: fixed;
    inset: 0;
    background: rgba(84,45,84,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.spec-check-overlay.hidden {
    display: none;
}

.overlay-content {
    background: #FFFFFF;
    padding: 8px 18px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #542D54; /* purple text (matches your screenshot) */
    font-weight: 600;
    font-size: 14px;
}

.overlay-spinner {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 3px solid #C99CCA;
    border-top-color: #542D54;
    animation: spin 1s linear infinite;
}

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

/* -----------------------------------
   ACTION BUTTON ROW
----------------------------------- */
.actions-row {
    width: 100%;
    max-width: 1200px;
    margin: 18px auto 28px auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
}

/* -----------------------------------
   UTILITY
----------------------------------- */
.hidden {
    display: none;
}
