/* ============================================================================
   Kampus Companion — Certificate Verification Form
   Matches the VerifyPage prototype (JSX lines 738-765)
   Uses CSS variables from the kc-child-theme
   ============================================================================ */

/* ── Container ─────────────────────────────────────────────────────────── */

.kc-verify-wrap {
    max-width: 440px;
    margin: 0 auto;
    padding: 40px 16px;
    text-align: center;
    font-family: 'DM Sans', sans-serif;
    color: var(--tx, #1a1a2e);
}

/* ── Icon circle ───────────────────────────────────────────────────────── */

.kc-verify-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: var(--bg3, #f1f5f9);
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kc-verify-icon {
    width: 24px;
    height: 24px;
    color: var(--navy, #24437A);
}

/* ── Title & subtitle ──────────────────────────────────────────────────── */

.kc-verify-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--tx, #1a1a2e);
}

.kc-verify-subtitle {
    color: var(--tx2, #64748b);
    font-size: 13px;
    margin: 0 0 24px;
    line-height: 1.5;
}

/* ── Form ──────────────────────────────────────────────────────────────── */

.kc-verify-form {
    background: var(--bg3, #f1f5f9);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    border: 2px dashed var(--bd, #e2e8f0);
    text-align: left;
}

.kc-verify-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--tx2, #64748b);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.kc-verify-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--bd, #e2e8f0);
    border-radius: 8px;
    font-family: 'DM Sans', monospace;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: var(--bg, #ffffff);
    color: var(--tx, #1a1a2e);
    box-sizing: border-box;
    margin-bottom: 16px;
    transition: border-color 0.2s;
}

.kc-verify-input:focus {
    outline: none;
    border-color: var(--navy, #24437A);
    box-shadow: 0 0 0 3px rgba(36, 67, 122, 0.1);
}

.kc-verify-input::placeholder {
    color: var(--tx3, #94a3b8);
    opacity: 1;
}

/* ── Button ────────────────────────────────────────────────────────────── */

.kc-verify-btn {
    width: 100%;
    padding: 12px 0;
    border-radius: 8px;
    background: var(--navy, #24437A);
    color: #fff;
    border: none;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.kc-verify-btn:hover {
    background: #18305a;
}

.kc-verify-btn:active {
    transform: scale(0.98);
}

.kc-verify-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ── Spinner (loading state) ───────────────────────────────────────────── */

.kc-verify-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--bd, #e2e8f0);
    border-top-color: var(--navy, #24437A);
    border-radius: 50%;
    margin: 0 auto 12px;
    animation: kc-spin 0.8s linear infinite;
}

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

.kc-verify-loading-text {
    font-size: 13px;
    color: var(--tx2, #64748b);
}

/* ── Result card ───────────────────────────────────────────────────────── */

.kc-verify-result {
    margin-top: 20px;
}

.kc-result-card {
    text-align: center;
}

.kc-result-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Valid state */
.kc-result-icon-wrap.kc-valid {
    background: rgba(13, 148, 136, 0.1);
}

.kc-result-status.kc-valid {
    font-family: 'DM Sans', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--teal, #0D9488);
    margin: 0 0 16px;
}

/* Invalid state */
.kc-result-icon-wrap.kc-invalid {
    background: rgba(225, 29, 72, 0.1);
}

.kc-result-status.kc-invalid {
    font-family: 'DM Sans', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #e11d48;
    margin: 0 0 16px;
}

/* Data rows */
.kc-result-data {
    background: var(--bg2, #f8fafc);
    border: 1px solid var(--bd, #e2e8f0);
    border-radius: 10px;
    padding: 16px;
    text-align: left;
    margin-bottom: 16px;
}

.kc-result-row {
    display: flex;
    justify-content: space-between;
    padding: 7px 0;
    border-bottom: 1px solid var(--bd, #e2e8f0);
    font-size: 12px;
}

.kc-result-row:last-child {
    border-bottom: none;
}

.kc-result-key {
    color: var(--tx2, #64748b);
}

.kc-result-value {
    font-weight: 600;
    color: var(--tx, #1a1a2e);
}

/* Status badge */
.kc-status-badge {
    background: rgba(13, 148, 136, 0.1);
    color: var(--teal, #0D9488);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

/* QR image */
.kc-result-qr {
    margin-top: 16px;
    text-align: center;
}

.kc-result-qr img {
    max-width: 160px;
    border-radius: 8px;
    border: 1px solid var(--bd, #e2e8f0);
}

/* Verify another link */
.kc-verify-another {
    background: none;
    border: none;
    color: var(--navy, #24437A);
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    margin-top: 8px;
}

.kc-verify-another:hover {
    text-decoration: underline;
}

/* ── Error message ─────────────────────────────────────────────────────── */

.kc-error-message {
    color: #e11d48;
    font-size: 13px;
    margin-top: 12px;
    padding: 12px;
    background: rgba(225, 29, 72, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(225, 29, 72, 0.15);
}

/* ── Responsive ────────────────────────────────────────────────────────── */

@media (max-width: 480px) {
    .kc-verify-wrap {
        padding: 24px 12px;
    }

    .kc-verify-form {
        padding: 16px;
    }
}
