/* ID Verify Plugin Styles */

.idv-wrap {
    max-width: 560px;
    margin: 40px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ── Card ────────────────────────────────────────────── */
.idv-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 36px 40px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, .07);
}

.idv-title {
    margin: 0 0 8px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a202c;
}

.idv-intro {
    margin: 0 0 28px;
    color: #64748b;
    font-size: .95rem;
    line-height: 1.55;
}

/* ── Dropzone ────────────────────────────────────────── */
/* Outer div — themes never override div borders, so this is reliable everywhere */
.idv-dropzone {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    margin-bottom: 12px;
    cursor: pointer;
    overflow: hidden;
    transition: border-color .2s, background .2s;
}

.idv-dropzone:hover,
.idv-dropzone.idv-drag-over {
    border-color: #2563eb;
    background: #eff6ff;
}

.idv-dropzone.idv-has-preview {
    border-style: solid;
}

/* Inner label — full-area tap target for mobile; themes may style it but only visually */
.idv-dropzone-trigger {
    display: block !important;
    padding: 40px 20px !important;
    text-align: center !important;
    cursor: pointer !important;
    margin: 0 !important;
    font-weight: normal !important;
    color: inherit !important;
    text-decoration: none !important;
}

.idv-dropzone-inner {
    pointer-events: none;
}

.idv-icon {
    width: 48px;
    height: 48px;
    color: #94a3b8;
    margin-bottom: 12px;
}

.idv-dropzone-prompt {
    margin: 0 0 4px;
    font-weight: 600;
    color: #334155;
}

.idv-dropzone-hint {
    margin: 0;
    font-size: .82rem;
    color: #94a3b8;
}

.idv-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.idv-preview {
    display: none;
    width: 100%;
    max-height: 240px;
    object-fit: cover;
}

.idv-has-preview .idv-dropzone-trigger {
    padding: 0 !important;
}

.idv-has-preview .idv-preview {
    display: block;
}

.idv-has-preview .idv-dropzone-inner {
    display: none;
}

/* ── Consent checkboxes ──────────────────────────────── */
.idv-consent {
    margin-bottom: 20px;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.idv-consent-row {
    display: table !important;
    width: 100% !important;
    margin-bottom: 10px;
}

.idv-consent-row:last-child {
    margin-bottom: 0;
}

.idv-checkbox {
    display: table-cell !important;
    vertical-align: top !important;
    width: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
    height: 18px !important;
    padding: 0 !important;
    margin: 2px 0 0 0 !important;
    accent-color: #2563eb;
    cursor: pointer;
    box-sizing: content-box !important;
}

.idv-consent-text {
    display: table-cell !important;
    vertical-align: top !important;
    padding-left: 8px !important;
    font-size: .9rem !important;
    font-weight: normal !important;
    color: #334155 !important;
    line-height: 1.5 !important;
    cursor: pointer;
    text-align: left !important;
    width: auto !important;
}

/* ── Error ───────────────────────────────────────────── */
.idv-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #b91c1c;
    padding: 10px 14px;
    font-size: .9rem;
    margin-bottom: 16px;
}

/* ── Button ──────────────────────────────────────────── */
.idv-btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: background .18s, opacity .18s, transform .12s;
}

.idv-btn-primary {
    background: #2563eb;
    color: #fff;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
}

.idv-btn-primary:hover:not(:disabled) {
    background: #1d4ed8;
}

.idv-btn-primary:active:not(:disabled) {
    transform: scale(.98);
}

.idv-btn-primary:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.idv-btn-clear {
    background: none;
    color: #64748b;
    font-size: .88rem;
    font-weight: 500;
    width: 100%;
    text-align: center;
    padding: 8px;
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.idv-btn-clear:hover {
    background: #f8fafc;
    color: #334155;
}

/* ── Loading ─────────────────────────────────────────── */
.idv-loading {
    text-align: center;
    padding: 60px 40px;
}

.idv-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: idv-spin .8s linear infinite;
    margin: 0 auto 20px;
}

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

/* ── Result ──────────────────────────────────────────── */
.idv-result {
    text-align: center;
}

.idv-result-icon {
    font-size: 3.5rem;
    margin-bottom: 12px;
    line-height: 1;
}

.idv-result-heading {
    margin: 0 0 8px;
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a202c;
}

.idv-result-subtext {
    color: #64748b;
    margin: 0 0 28px;
    font-size: .95rem;
}

/* ── Result image ────────────────────────────────────── */
.idv-result-image {
    display: block;
    width: 100%;
    max-height: 260px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    margin-bottom: 24px;
}

/* ── Data table ──────────────────────────────────────── */
.idv-data {
    text-align: left;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    margin: 0 0 20px;
}

.idv-data-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid #f1f5f9;
}

.idv-data-row:last-child {
    border-bottom: none;
}

.idv-data dt {
    flex: 0 0 110px;
    font-size: .82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #94a3b8;
}

.idv-data dd {
    margin: 0;
    font-size: .95rem;
    color: #1e293b;
    word-break: break-word;
}

.idv-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 700;
}

.idv-badge-valid {
    background: #dcfce7;
    color: #15803d;
}

.idv-badge-invalid {
    background: #fef2f2;
    color: #b91c1c;
}

.idv-validity-reason {
    font-size: .85rem;
    color: #64748b;
    font-style: italic;
    margin: 0 0 24px;
}

.idv-redirect-notice {
    color: #64748b;
    font-size: .9rem;
    margin: 0 0 16px;
}

/* ── States ──────────────────────────────────────────── */
.idv-result.idv-pass .idv-result-heading { color: #15803d; }
.idv-result.idv-fail .idv-result-heading { color: #b91c1c; }
