/* ============================================================
   TESTER PORTAL — additions on top of your main style.css
   Uses your existing variables (--accent-purple, --bg-panel, …)
   so it matches the support site exactly.
   ============================================================ */

/* Single-column, centred layout for the portal pages */
.tester-page .layout-wrapper.tester-wrapper {
    display: block;
    max-width: 900px;
    margin: var(--nav-height) auto 0 auto;
    padding: 0 20px;
}
.tester-page .left-sidebar,
.tester-page .right-sidebar { display: none !important; }
.tester-page .main-content { padding: 70px 0 60px 0; }

/* ---- Collapsible checklist sections ---- */
.test-accordion { padding: 0; }
.test-accordion summary {
    list-style: none;
    cursor: pointer;
    padding: 22px 28px;
    font-weight: 600;
    color: var(--text-main);
    font-size: 17px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.test-accordion summary::-webkit-details-marker { display: none; }
.test-accordion summary::before {
    content: "\f054"; /* fa chevron-right */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 12px;
    color: var(--accent-purple);
    transition: transform 0.2s ease;
}
.test-accordion[open] summary::before { transform: rotate(90deg); }
.test-accordion .check-list,
.test-accordion .note-list,
.test-accordion .menu-grid { padding: 18px 28px 26px 28px; }

/* ---- Notes (no checkbox, no bullet) ---- */
.note-list { display: flex; flex-direction: column; gap: 4px; }
.note-line {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
    padding: 6px 0 6px 14px;
    border-left: 2px solid var(--border-subtle);
}

/* ---- Self-tracking checklist (checkboxes, not submitted) ---- */
.check-list { display: flex; flex-direction: column; margin: 0; }
.check-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 9px 10px;
    border-radius: 10px;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.5;
    transition: background 0.15s, color 0.15s;
}
.check-item:hover { background: rgba(255, 255, 255, 0.03); }
.check-item input {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    margin: 1px 0 0 0;
    flex-shrink: 0;
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    position: relative;
    transition: background 0.15s, border-color 0.15s;
}
.check-item input:checked { background: var(--accent-purple); border-color: var(--accent-purple); }
.check-item input:checked::after {
    content: "\f00c"; /* fa check */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 11px;
    color: #fff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.check-item input:checked + span { color: var(--text-main); text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, 0.25); }

/* ---- Menu map (buttons as checkable chips) ---- */
.menu-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.menu-chip {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 14px 9px 12px;
    border: 1px solid var(--border-subtle);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.menu-chip:hover { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.15); }
.menu-chip input {
    appearance: none;
    -webkit-appearance: none;
    width: 16px; height: 16px;
    flex-shrink: 0;
    border: 1px solid var(--border-subtle);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    position: relative;
}
.menu-chip input:checked { background: var(--accent-purple); border-color: var(--accent-purple); }
.menu-chip input:checked::after {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 9px;
    color: #fff;
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}
.menu-chip:has(input:checked) {
    background: rgba(139, 92, 246, 0.12);
    border-color: rgba(139, 92, 246, 0.4);
    color: var(--text-main);
}

/* ---- Form fields ---- */
.tester-form .spec-card { padding: 24px 28px; margin-bottom: 22px; }
.field { margin: 0; }
.field + .field { margin-top: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.field-label {
    display: block;
    color: var(--text-main);
    font-weight: 500;
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 12px;
}
.req { color: var(--app-red); }

.tester-form input[type="text"],
.tester-form input[type="password"],
.tester-form textarea,
.tester-form select {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
    padding: 12px 16px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.tester-form textarea { resize: vertical; min-height: 80px; line-height: 1.6; }
.tester-form input:focus,
.tester-form textarea:focus,
.tester-form select:focus {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.15);
}
.tester-form select { appearance: none; cursor: pointer; }

/* Native dropdown option list — the browser draws this on the OS layer, so it needs a
   SOLID (non-translucent) dark background or unselected options render white-on-white. */
.tester-form select option,
.builder-row select option {
    background-color: #1b1b22;
    color: var(--text-main);
}

/* Honeypot — visually hidden, off-screen, not display:none (so bots still see it) */
.hp-field {
    position: absolute !important;
    left: -9999px !important;
    width: 1px; height: 1px;
    opacity: 0; pointer-events: none;
}

/* ---- Radio "pill" group ---- */
.pill-group { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
    position: relative;
    border: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-main);
    padding: 9px 18px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
}
.pill:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.15); }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill:has(input:checked) {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.5);
    color: #c4b5fd;
}
/* Filter pills (links) on the admin list */
a.pill { text-decoration: none; color: var(--text-main) !important; }
a.pill.pill-on { background: rgba(139, 92, 246, 0.15); border-color: rgba(139, 92, 246, 0.5); color: #c4b5fd !important; }

/* ---- Star rating ---- */
.rating { display: inline-flex; flex-direction: row-reverse; gap: 6px; }
.rating input { display: none; }
.rating label { cursor: pointer; font-size: 26px; color: rgba(255,255,255,0.15); transition: color 0.15s; }
.rating label:hover,
.rating label:hover ~ label,
.rating input:checked ~ label { color: var(--warning-orange); }

/* ---- Admin table ---- */
.sub-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.sub-table th {
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-subtle);
}
.sub-table td { padding: 14px 20px; border-bottom: 1px solid rgba(255,255,255,0.03); color: var(--text-muted); }
.sub-table tr:last-child td { border-bottom: none; }
.sub-table tr:hover td { background: rgba(255,255,255,0.02); }
.sub-table a { color: var(--text-main) !important; font-weight: 600; }
.sub-table tr.is-reviewed td { opacity: 0.5; }

.mini-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted) !important;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}
.mini-btn:hover { color: var(--text-main) !important; border-color: rgba(255,255,255,0.15); }

/* ---- Single submission answers ---- */
.answer-block { padding: 18px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.answer-block:last-child { border-bottom: none; }
.answer-q { color: var(--text-muted); font-size: 13px; margin-bottom: 8px; }
.answer-a { color: var(--text-main); font-size: 15px; line-height: 1.6; }

/* ---- Admin form builder (Products editor) ---- */
.builder-row {
    position: relative;
    background: var(--bg-panel);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 22px 24px;
    margin-bottom: 16px;
    display: grid;
    grid-template-columns: 1.1fr 0.8fr 1.6fr;
    gap: 18px;
    align-items: start;
}
.builder-row .bf { min-width: 0; }
.builder-row .field-label { font-size: 13px; margin-bottom: 8px; }
.builder-row input,
.builder-row select,
.builder-row textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
    padding: 10px 12px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
}
.builder-row textarea { resize: vertical; line-height: 1.5; }
.builder-row input:focus,
.builder-row select:focus,
.builder-row textarea:focus { border-color: rgba(139, 92, 246, 0.5); box-shadow: 0 0 12px rgba(139, 92, 246, 0.12); }
.row-del {
    position: absolute;
    top: 10px; right: 12px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 6px;
}
.row-del:hover { color: var(--app-red); background: rgba(251, 113, 133, 0.1); }

@media (max-width: 720px) {
    .builder-row { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .field-row { grid-template-columns: 1fr; }
    .sub-table th:nth-child(4), .sub-table td:nth-child(4) { display: none; }
}
