/* ── Wrapper ────────────────────────────────────────────────────────────────── */
.scan3d-wrap {
    max-width: 540px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1a1a1a;
}

.scan3d-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.scan3d-desc {
    color: #555;
    margin-bottom: 1.5rem;
    line-height: 1.55;
}

/* ── Drop zone ──────────────────────────────────────────────────────────────── */
.scan3d-dropzone {
    border: 2.5px dashed #bbb;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    background: #fafafa;
}

.scan3d-dropzone:hover,
.scan3d-dropzone.drag-over {
    border-color: #0073aa;
    background: #f0f7ff;
}

.scan3d-dropzone__icon {
    font-size: 2.8rem;
    margin-bottom: 0.6rem;
}

.scan3d-dropzone__text {
    font-size: 1rem;
    margin: 0 0 0.3rem;
}

.scan3d-browse-link {
    color: #0073aa;
    cursor: pointer;
    text-decoration: underline;
    font-weight: 600;
}

.scan3d-dropzone__hint {
    font-size: 0.8rem;
    color: #888;
    margin: 0;
}

/* ── Preview ────────────────────────────────────────────────────────────────── */
.scan3d-preview {
    margin-bottom: 1.25rem;
    position: relative;
    text-align: center;
}

.scan3d-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    display: block;
    margin: 0 auto 0.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.12);
}

.scan3d-change-btn {
    background: none;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 0.3rem 0.8rem;
    font-size: 0.82rem;
    cursor: pointer;
    color: #555;
    transition: border-color 0.2s;
}

.scan3d-change-btn:hover {
    border-color: #0073aa;
    color: #0073aa;
}

/* ── Form ───────────────────────────────────────────────────────────────────── */
.scan3d-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
    font-size: 0.92rem;
}

.scan3d-input {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 1.5px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.2s;
    margin-bottom: 1rem;
}

.scan3d-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0,115,170,0.12);
}

/* ── Consent ────────────────────────────────────────────────────────────────── */
.scan3d-consent {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    margin-bottom: 1.25rem;
}

.scan3d-checkbox {
    margin-top: 3px;
    flex-shrink: 0;
    width: 17px;
    height: 17px;
    cursor: pointer;
    accent-color: #0073aa;
}

.scan3d-consent-label {
    font-size: 0.86rem;
    color: #444;
    line-height: 1.5;
    cursor: pointer;
}

/* ── Error ──────────────────────────────────────────────────────────────────── */
.scan3d-error {
    background: #fff3f3;
    border: 1px solid #f5c6cb;
    color: #c0392b;
    border-radius: 7px;
    padding: 0.6rem 0.9rem;
    font-size: 0.88rem;
    margin-bottom: 1rem;
}

/* ── Submit button ──────────────────────────────────────────────────────────── */
.scan3d-submit-btn {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
}

.scan3d-submit-btn:hover {
    background: #005f8d;
}

.scan3d-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ── Progress ───────────────────────────────────────────────────────────────── */
.scan3d-progress-wrap {
    text-align: center;
    padding: 2rem 0;
}

.scan3d-spinner {
    width: 42px;
    height: 42px;
    border: 4px solid #e0e0e0;
    border-top-color: #0073aa;
    border-radius: 50%;
    animation: scan3d-spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

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

.scan3d-progress-bar-track {
    background: #e5e5e5;
    border-radius: 99px;
    height: 7px;
    margin: 0.8rem auto 0;
    max-width: 320px;
    overflow: hidden;
}

.scan3d-progress-bar-fill {
    height: 100%;
    background: #0073aa;
    width: 0%;
    transition: width 0.2s;
    border-radius: 99px;
}

/* ── Success ────────────────────────────────────────────────────────────────── */
.scan3d-success {
    text-align: center;
    padding: 2.5rem 1rem;
}

.scan3d-success__icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
}

.scan3d-success__msg {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
}

.scan3d-success__jobid {
    font-size: 0.78rem;
    color: #999;
    font-family: monospace;
}
