/* Shared premium components for the Report/Verify Device experience.
   Deliberately its own file, loaded only on those two pages -- reuses
   public-shell.css's existing tokens (--gv-primary etc., .public-card,
   .public-field, .public-btn) rather than inventing a second design
   language; this file only adds the NEW component shapes those pages
   needed (segmented nav, stepper, combobox, identity card, option cards,
   review summary, status result card). */

.device-page-wide { max-width: 880px; }

/* ---------- Report / Verify segmented switcher ---------- */

.gv-mode-switch {
    display: flex;
    gap: 4px;
    background: #eef1f6;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 22px;
}
.gv-mode-switch a {
    flex: 1;
    text-align: center;
    padding: 12px 16px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    color: #5a6578;
}
.gv-mode-switch a.is-active {
    background: #fff;
    color: #172033;
    box-shadow: 0 2px 8px rgba(25, 35, 55, 0.08);
}

/* ---------- Stepper ---------- */

.gv-stepper {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    padding: 20px 22px 4px;
    overflow-x: auto;
}
.gv-step {
    flex: 1;
    min-width: 84px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    position: relative;
}
.gv-step::before {
    content: '';
    position: absolute;
    top: 15px;
    left: -50%;
    width: 100%;
    height: 2px;
    background: #e4e8ef;
    z-index: 0;
}
.gv-step:first-child::before { display: none; }
.gv-step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #eef1f6;
    color: #8792a2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
    z-index: 1;
    border: 2px solid #f5f7fb;
}
.gv-step-label {
    font-size: 12px;
    font-weight: 650;
    color: #8792a2;
    line-height: 1.3;
}
.gv-step.is-complete .gv-step-circle { background: var(--gv-primary, #2563EB); color: #fff; }
.gv-step.is-complete::before { background: var(--gv-primary, #2563EB); }
.gv-step.is-active .gv-step-circle { background: var(--gv-primary, #2563EB); color: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--gv-primary, #2563EB) 18%, transparent); }
.gv-step.is-active .gv-step-label { color: #172033; }

@media (max-width: 600px) {
    .gv-step-label { display: none; }
    .gv-step.is-active .gv-step-label { display: block; }
}

.gv-step-panel { display: none; }
.gv-step-panel.is-active { display: block; }

.gv-step-nav {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 22px 22px;
}
.gv-step-nav .public-btn,
.gv-step-nav .public-btn-secondary { width: auto; padding: 0 22px; }
.gv-step-nav-spacer { flex: 1; }

/* ---------- Device identity card ---------- */

.gv-identity-card {
    border: 1px solid #dbe3f5;
    background: color-mix(in srgb, var(--gv-primary, #2563EB) 4%, white);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 4px;
}
.gv-identity-card .public-field:last-child { margin-bottom: 0; }
.gv-identity-required-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--gv-primary, #2563EB) 12%, white);
    color: var(--gv-primary, #2563EB);
    margin-left: 8px;
    vertical-align: middle;
}
.gv-identity-optional-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #8792a2;
    margin-left: 8px;
    vertical-align: middle;
}
.gv-identity-input-group { position: relative; }
.gv-identity-input-group input { padding-right: 46px; }
/* DeviceScanner.attach() builds this button itself (icon + a "Scan" text
   node) -- font-size:0 collapses the text visually while keeping it
   in the accessible name/DOM, then the icon's own font-size restores it. */
.gv-scan-btn {
    position: absolute;
    right: 6px;
    top: 6px;
    bottom: 6px;
    width: 38px;
    border: none;
    border-radius: 8px;
    background: #eef1f6;
    color: #455166;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0;
}
.gv-scan-btn i { font-size: 16px; }
.gv-scan-btn:hover { background: #e2e7ee; }

/* ---------- Combobox ---------- */

.gv-combobox { position: relative; }
.gv-combobox-native {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.gv-combobox-input {
    width: 100%;
    min-height: 48px;
    padding: 10px 38px 10px 14px;
    border: 1px solid #dce2ea;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238792a2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
    background-size: 16px;
}
.gv-combobox-input:focus {
    outline: none;
    border-color: var(--gv-primary, #2563EB);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--gv-primary, #2563EB) 12%, transparent);
}
.gv-combobox-disabled .gv-combobox-input { background-color: #f5f6f8; color: #a3adba; cursor: not-allowed; }
.gv-combobox-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 260px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e4e8ef;
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(25, 35, 55, 0.14);
    z-index: 30;
    padding: 6px;
}
.gv-combobox-option {
    padding: 9px 12px;
    border-radius: 7px;
    font-size: 14px;
    cursor: pointer;
    color: #172033;
}
.gv-combobox-option.is-highlighted,
.gv-combobox-option:hover { background: #eef1f6; }
.gv-combobox-option.is-selected { font-weight: 700; color: var(--gv-primary, #2563EB); }

/* ---------- Option cards (report type, condition, device source) ---------- */

.gv-option-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.gv-option-card {
    position: relative;
    border: 1.5px solid #e0e4eb;
    border-radius: 12px;
    padding: 14px 16px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.gv-option-card input { position: absolute; opacity: 0; pointer-events: none; }
.gv-option-card-title { font-weight: 700; font-size: 14px; color: #172033; }
.gv-option-card-desc { font-size: 12px; color: #8792a2; line-height: 1.4; }
.gv-option-card:has(input:checked) { border-color: var(--gv-primary, #2563EB); background: color-mix(in srgb, var(--gv-primary, #2563EB) 5%, white); }
.gv-option-card:has(input:focus-visible) { outline: 2px solid var(--gv-primary, #2563EB); outline-offset: 2px; }

/* ---------- Review / confirmation step ---------- */

.gv-review-list { border-top: 1px solid #edf0f4; }
.gv-review-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 0;
    border-bottom: 1px solid #edf0f4;
    font-size: 14px;
}
.gv-review-row dt { color: #8792a2; font-weight: 600; flex: 0 0 auto; }
.gv-review-row dd { margin: 0; text-align: right; font-weight: 650; color: #172033; word-break: break-word; }
.gv-review-consequence {
    margin-top: 18px;
    padding: 14px 16px;
    background: #fff8e6;
    border: 1px solid #f5d78e;
    border-radius: 10px;
    font-size: 13px;
    color: #6b5311;
    line-height: 1.6;
}

/* ---------- Verify status result card ---------- */

.gv-status-card {
    border-radius: 16px;
    padding: 26px 24px;
    margin-bottom: 22px;
    border: 1px solid;
    display: flex;
    gap: 16px;
}
.gv-status-icon {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}
.gv-status-card h2 { font-size: 18px; margin: 0 0 6px; }
.gv-status-card p { font-size: 14px; line-height: 1.6; margin: 0 0 4px; color: #455166; }
.gv-status-body { flex: 1; min-width: 0; }

.gv-status-clear { background: #ecfdf3; border-color: #a9e8c3; }
.gv-status-clear .gv-status-icon { background: #16a34a; color: #fff; }
.gv-status-clear h2 { color: #06713a; }

.gv-status-danger { background: #fef2f2; border-color: #f3c6c6; }
.gv-status-danger .gv-status-icon { background: #dc2626; color: #fff; }
.gv-status-danger h2 { color: #991b1b; }

.gv-status-caution { background: #fff8e6; border-color: #f5d78e; }
.gv-status-caution .gv-status-icon { background: #d97706; color: #fff; }
.gv-status-caution h2 { color: #92710a; }

.gv-status-neutral { background: #f8f9fc; border-color: #e2e6ec; }
.gv-status-neutral .gv-status-icon { background: #64748b; color: #fff; }
.gv-status-neutral h2 { color: #334155; }

.gv-device-summary {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(0,0,0,0.08);
}
.gv-device-summary dl { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; }
.gv-device-summary dt { font-size: 11px; text-transform: uppercase; letter-spacing: 0.03em; color: #8792a2; font-weight: 700; }
.gv-device-summary dd { margin: 2px 0 0; font-size: 14px; font-weight: 650; color: #172033; }

/* ---------- Loading state on the Check/Submit action ---------- */

.gv-btn-loading .gv-btn-label { visibility: hidden; }
.gv-btn-loading { position: relative; }
.gv-btn-loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2.5px solid rgba(255,255,255,0.35);
    border-top-color: #fff;
    animation: gv-spin 0.7s linear infinite;
}
@keyframes gv-spin { to { transform: rotate(360deg); } }

@media (max-width: 640px) {
    .gv-review-row { flex-direction: column; gap: 2px; }
    .gv-review-row dd { text-align: left; }
    .gv-status-card { flex-direction: column; }
}
