/* ====================================================
   Beauty Test – Guided Capture  (standalone, non-AMP)
   ==================================================== */

/* Hero icon + subtitle */
.gc-hero-icon {
    text-align: center;
    margin-bottom: 16px;
}
.gc-scan-frame {
    position: relative;
    display: inline-block;
    width: 200px;
    height: 200px;
}
.gc-scan-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 200px;
    height: 200px;
    object-fit: contain;
    display: block;
    filter: grayscale(1) contrast(1.05);
}
.gc-scan-img--f {
    animation: gc-show-f 10s ease-in-out infinite;
    z-index: 2;
}
.gc-scan-img--m {
    animation: gc-show-m 10s ease-in-out infinite;
    z-index: 1;
}
@keyframes gc-show-f {
    0%   { opacity: 1; }
    35%  { opacity: 1; }
    45%  { opacity: 0; }
    90%  { opacity: 0; }
    100% { opacity: 1; }
}
@keyframes gc-show-m {
    0%   { opacity: 0; }
    45%  { opacity: 0; }
    55%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { opacity: 0; }
}
.gc-scan-corners {
    position: absolute;
    top: 0;
    left: 0;
    width: 200px;
    height: 200px;
    opacity: 0.8;
    pointer-events: none;
}
.gc-hero-subtitle {
    text-align: center;
    font-size: 15px;
    color: var(--text-color, #666);
    opacity: 0.75;
    margin: -8px 0 12px;
    line-height: 1.6;
}
.gc-btn-wrap {
    position: relative;
    display: inline-block;
}
.gc-popular-badge {
    position: absolute;
    top: -33px;
    inset-inline-end: 75px;
    background: #f97316;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    white-space: nowrap;
    z-index: 1;
    pointer-events: none;
    letter-spacing: 0.03em;
    animation: gc-badge-pulse 2s ease-in-out infinite;
}
@keyframes gc-badge-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}
#gcStartBtn {
    animation: gc-btn-border-pulse 2s ease-in-out infinite;
}
@keyframes gc-btn-border-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0,0,0,0.5); }
    50% { box-shadow: 0 0 0 6px rgba(0,0,0,0); }
}
.gc-usage-tips {
    text-align: center;
    margin: 0 auto 24px;
    max-width: 320px;
}
.gc-usage-tips ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.gc-usage-tips ul li {
    font-size: 12px;
    opacity: 0.5;
    line-height: 1.5;
}
.gc-usage-tips ul li::before {
    content: '· ';
}

/* Center page headings */
.section-title,
.section-subtitle {
    text-align: center;
}

/* Fix overflow:hidden from style.min.css that clips the nationality popup */
.content-section,
section,
.content-section .container,
.container {
    overflow: visible !important;
}

.gc-form-wrapper {
    max-width: 580px;
    margin: 0 auto;
}

/* ─── Card ─── */
.bt-card {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 18px;
    overflow: visible;
}

.bt-card--mb { margin-bottom: 16px; }

.bt-cardHead {
    padding: 16px 22px;
    border-bottom: 1px solid rgba(255,255,255,0.09);
}

.bt-cardTitle {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--heading-color, #fff);
    margin: 0;
}

.bt-cardBody { padding: 22px; }

/* ─── 3-column grid ─── */
.gc-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr;
    gap: 14px;
    align-items: end;
}

.gc-fields-grid .form-group,
.gc-form-wrapper .form-group { margin: 0; }

.gc-form-wrapper .form-group label {
    display: block;
    margin-bottom: 7px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: rgba(0,0,0,0.55);
}

/* ─── Inputs & Selects ─── */
.gc-form-wrapper input[type="number"],
.gc-form-wrapper input[type="text"],
.gc-form-wrapper select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1.5px solid rgba(0,0,0,0.18);
    color: #111;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
}

.gc-form-wrapper input[type="number"]::placeholder { color: rgba(0,0,0,0.30); }

.gc-form-wrapper input:focus,
.gc-form-wrapper select:focus {
    outline: none;
    border-color: #111;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.08);
}

.gc-form-wrapper select {
    cursor: pointer;
    color-scheme: light;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(0,0,0,0.5)' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 13px center;
    padding-left: 36px;
}

[dir="ltr"] .gc-form-wrapper select {
    background-position: right 13px center;
    padding-left: 14px;
    padding-right: 36px;
}

.gc-form-wrapper select option {
    background: #fff;
    color: #111;
}

/* ─── Gender Toggle ─── */
.gc-gender-toggle {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.gc-gender-btn {
    flex: 1;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1.5px solid rgba(0,0,0,0.18);
    background: #fff;
    color: #111;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.gc-gender-btn:hover {
    border-color: rgba(0,0,0,0.40);
}

.gc-gender-btn.active {
    background: #111;
    border-color: #111;
    color: #fff;
}

/* ─── Custom Nationality Dropdown ─── */
.gc-nat-wrap {
    position: relative;
    width: 100%;
    min-width: 0;
}

.gc-nat-btn {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: border-color 0.2s, background 0.2s;
    box-sizing: border-box;
}

[dir="rtl"] .gc-nat-btn { text-align: right; }
[dir="ltr"] .gc-nat-btn { text-align: left; }

.gc-nat-btn:hover,
.gc-nat-btn[aria-expanded="true"] {
    border-color: var(--button-color, #1e3a8a);
    background: rgba(255,255,255,0.13);
}

.gc-nat-btn span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gc-nat-btn svg  { flex-shrink: 0; opacity: 0.55; transition: transform 0.2s; }
.gc-nat-btn[aria-expanded="true"] svg { transform: rotate(180deg); }

.gc-nat-btn-flag {
    width: 24px; height: 17px;
    border-radius: 3px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

/* ─── Nationality Popup ─── */
.gc-nat-popup {
    display: none;
    position: fixed;
    background: #0f172a;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 14px;
    z-index: 999999;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0,0,0,0.65);
}

.gc-nat-search-box {
    padding: 10px 12px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.gc-nat-search {
    width: 100%;
    padding: 9px 13px;
    background: rgba(255,255,255,0.08);
    border: 1.5px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    color: #fff;
    font-family: inherit;
    font-size: 0.88rem;
    box-sizing: border-box;
}

.gc-nat-search:focus { outline: none; border-color: var(--button-color, #1e3a8a); }
.gc-nat-search::placeholder { color: rgba(255,255,255,0.30); }

.gc-nat-list {
    list-style: none; padding: 6px 0; margin: 0;
    max-height: 230px; overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.gc-nat-list::-webkit-scrollbar { width: 4px; }
.gc-nat-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }

.gc-nat-opt {
    display: flex; align-items: center; gap: 11px;
    padding: 9px 14px;
    cursor: pointer;
    font-size: 0.92rem;
    color: rgba(255,255,255,0.85);
    transition: background 0.12s;
}
.gc-nat-opt:hover { background: rgba(255,255,255,0.07); }
.gc-nat-opt.selected { background: rgba(255,255,255,0.12); color: #fff; font-weight: 600; }

.gc-nat-opt img {
    width: 24px; height: 17px;
    border-radius: 3px;
    object-fit: cover;
    flex-shrink: 0;
}

/* ─── Start Row ─── */
.gc-start-row {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}
.gc-start-row + .gc-divider-row { margin-top: 16px; }
.gc-divider-row + .gc-start-row { margin-top: 0; }

/* ─── Or Divider ─── */
.gc-divider-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0 0;
}
.gc-divider-line {
    flex: 1;
    height: 1px;
    background: var(--text-color, rgba(255,255,255,0.12));
    opacity: 0.15;
}
.gc-divider-text {
    font-size: 0.82rem;
    color: var(--text-color, rgba(255,255,255,0.45));
    opacity: 0.5;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

/* ─── Upload button secondary style ─── */
#gcUploadBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    padding: 8px 20px;
}

/* ─── Upload preview overlay ─── */
.gc-upload-preview {
    position: relative;
    max-width: 340px;
    margin: 16px auto 0;
    border-radius: 12px;
    overflow: hidden;
    display: none;
}
.gc-upload-preview img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}
.gc-upload-progress {
    text-align: center;
    margin-top: 12px;
    font-size: 0.88rem;
    color: rgba(255,255,255,0.7);
}
.gc-upload-progress .gc-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: gc-spin 0.6s linear infinite;
    vertical-align: middle;
    margin-inline-end: 6px;
}
@keyframes gc-spin { to { transform: rotate(360deg); } }

/* ─── Alerts ─── */
.error-message {
    background: rgba(220,38,38,0.12);
    border: 1px solid rgba(220,38,38,0.30);
    color: #fca5a5;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.88rem;
    margin-bottom: 12px;
    display: none;
}
.error-message:not(:empty) { display: block; }

.success-message {
    background: rgba(22,163,74,0.12);
    border: 1px solid rgba(22,163,74,0.28);
    color: #86efac;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.88rem;
    margin-bottom: 12px;
    display: none;
}
.success-message:not(:empty) { display: block; }

/* ─── Guidance Panel ─── */
.gc-guidance {
    margin: 0 0 14px;
    background: #000;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 14px;
    padding: 14px 18px;
    color: #fff;
}

/* ─── Step Tracker ─── */
.gc-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 16px;
}

.gc-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.gc-step-dot {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.35);
    background: rgba(255,255,255,0.07);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: background 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.gc-step-dot svg {
    display: none;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.gc-step-num {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255,255,255,0.65);
    transition: color 0.2s;
    line-height: 1;
}

.gc-step-line {
    flex: 1;
    height: 2px;
    background: rgba(255,255,255,0.12);
    min-width: 40px;
    align-self: flex-start;
    margin-top: 17px;
    transition: background 0.3s;
}

.gc-step-label {
    font-size: 11px;
    color: rgba(255,255,255,0.55);
    white-space: nowrap;
    transition: color 0.2s;
    text-align: center;
}

/* Active step */
.gc-step.active .gc-step-dot {
    border-color: #fff;
    background: #fff;
    box-shadow: 0 0 16px rgba(255,255,255,0.30);
}
.gc-step.active .gc-step-num {
    color: #000;
}
.gc-step.active .gc-step-label {
    color: #fff;
    font-weight: 700;
}

/* Done step */
.gc-step.done .gc-step-dot {
    border-color: rgba(34,197,94,0.85);
    background: rgba(34,197,94,0.80);
    box-shadow: 0 0 8px rgba(34,197,94,0.35);
}
.gc-step.done .gc-step-dot svg {
    display: block;
}
.gc-step.done .gc-step-dot .gc-step-num {
    display: none;
}
.gc-step.done .gc-step-label {
    color: rgba(34,197,94,0.90);
}

/* Line after a done step is also green */
.gc-step.done + .gc-step-line {
    background: rgba(34,197,94,0.45);
}

/* ─── Instruction Block ─── */
.gc-instr-block {
    margin-bottom: 12px;
}

/* ─── Progress status row ─── */
.gc-progress-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

/* ─── Info Summary Bar ─── */
.gc-info-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}

.gc-info-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    align-items: center;
}

.gc-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.20);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}

.gc-info-edit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 8px;
    color: #fff;
    font-family: inherit;
    font-size: 0.80rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.2s, background 0.2s;
    flex-shrink: 0;
}

.gc-info-edit:hover {
    border-color: #fff;
    background: rgba(255,255,255,0.10);
}

.gc-instruction {
    font-size: 15px; line-height: 1.4;
    font-weight: 600; color: #fff;
    text-align: center;
    transition: opacity 0.2s ease;
}

.gc-sub { color: rgba(255,255,255,0.70); margin-top: 4px; font-size: 13px; line-height: 1.35; text-align: center; transition: opacity 0.2s ease; }

/* ─── Guidance Checklist ─── */
.gc-checklist {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.gc-check-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    border: 1.5px solid rgba(255,80,80,0.5);
    background: rgba(255,80,80,0.08);
    color: rgba(255,120,120,0.95);
    transition: border-color 0.25s, background 0.25s, color 0.25s;
}
.gc-check-item.gc-check-pass {
    border-color: rgba(34,197,94,0.6);
    background: rgba(34,197,94,0.10);
    color: rgba(34,197,94,0.95);
}
.gc-check-item.gc-check-fail {
    border-color: rgba(255,80,80,0.5);
    background: rgba(255,80,80,0.08);
    color: rgba(255,120,120,0.95);
}
.gc-check-icon {
    font-size: 12px;
    line-height: 1;
}

.gc-progress { margin-top: 10px; }
.gc-progress-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gc-phase-pills { display: flex; gap: 7px; align-items: center; }

.gc-phase-pill {
    width: 26px; height: 26px; border-radius: 999px;
    border: 2px solid rgba(255,255,255,0.20);
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700;
    color: rgba(255,255,255,0.60);
    transition: background 0.2s, border-color 0.2s;
}
.gc-phase-pill.active { background: var(--button-color,#1e3a8a); border-color: var(--button-color,#1e3a8a); color:#fff; }
.gc-phase-pill.done  { background: rgba(22,163,74,0.75); border-color:transparent; color:#fff; }

.gc-phase-text { margin-left:6px; font-size:12px; color:rgba(255,255,255,0.75); }
[dir="rtl"] .gc-phase-text { margin-left:0; margin-right:6px; }
.gc-status-text { font-size:12px; color:rgba(255,255,255,0.75); text-align:right; }
[dir="rtl"] .gc-status-text { text-align:left; }

.gc-progress-bar-track {
    margin-top:10px; height:4px;
    border-radius:999px; overflow:hidden;
}
.gc-progress-bar {
    height:100%; width:0%;
    background:#fff;
    border-radius:999px; transition:width 300ms ease-out;
}

/* ─── Camera Stage ─── */
.gc-stage {
    position:relative; width:100%;
    aspect-ratio:3/4; max-height:55vh;
    background:#000; border-radius:16px;
    overflow:hidden;
    border:1px solid rgba(255,255,255,0.10);
    margin-bottom:12px;
}
.gc-video { width:100%; height:100%; object-fit:cover; }
.gc-overlay { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; z-index:3; }
.gc-frame-overlay { position:absolute; inset:0; pointer-events:none; }
.gc-frame-bg { position:absolute; inset:0; background:rgba(0,0,0,0.18); }
.gc-center-line { position:absolute; left:50%; top:0; bottom:0; width:1px; transform:translateX(-50%); background:rgba(255,255,255,0.38); }
.gc-oval {
    position:absolute; left:50%; top:46%;
    width:62%; height:78%;
    transform:translate(-50%,-50%);
    border:2.5px solid rgba(255,80,80,0.9);
    border-radius:50%;
    box-shadow:0 0 0 9999px rgba(0,0,0,0.18),0 0 18px rgba(255,80,80,0.2);
    transition:border-color 0.3s,box-shadow 0.3s;
}
.gc-oval.ready {
    border-color:rgba(80,200,120,0.95);
    box-shadow:0 0 0 9999px rgba(0,0,0,0.18),0 0 22px rgba(80,200,120,0.35);
}
.gc-hud { display:none; }
.gc-canvas { display:none; }

/* ─── Action Buttons ─── */
.gc-btn-row { margin-top:4px; display:flex; gap:10px; flex-wrap:wrap; justify-content:center; }
#gcCaptureBtn,#gcRetakeBtn,#gcSubmitBtn { display:none; }

/* ─── Mirror Toggle ─── */
.gc-mirror-row {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gc-mirror-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    padding: 7px 16px;
    background: transparent;
    border: none;
    border-radius: 999px;
    font-size: 0.83rem;
    color: rgba(0,0,0,0.75);
    transition: color 0.2s;
}
.gc-mirror-label:hover {
    color: #000;
}
.gc-mirror-label input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0,0,0,0.40);
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    flex-shrink: 0;
}
.gc-mirror-label input[type="checkbox"]:checked {
    background: #000;
    border-color: #000;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 10 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 4l3 3 5-6' stroke='%23fff' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 10px 8px;
}

/* ─── Tips ─── */
.gc-tips {
    margin-top:12px; padding:11px 16px;
    background:#000;
    border:1px solid rgba(255,255,255,0.15);
    border-radius:10px;
    font-size:0.83rem; line-height:1.55;
    color:#fff;
}

/* ─── Responsive ─── */
@media (max-width: 540px) {
    .gc-fields-grid { grid-template-columns: 1fr; }
    .bt-cardBody { padding: 16px; }
    .gc-stage { max-height: 70vw; }
}
