/* ── Certificate Verifier Styles ── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=DM+Sans:wght@400;500;600&display=swap');

.cv-wrapper {
    font-family: 'DM Sans', sans-serif;
    max-width: 560px;
    margin: 40px auto;
    padding: 0 16px;
}

.cv-search-box {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 16px;
    padding: 40px 40px 36px;
    box-shadow: 0 4px 32px rgba(0,0,0,0.07);
}

/* ── Fields ── */
.cv-field {
    margin-bottom: 18px;
}

.cv-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 7px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.cv-field input {
    width: 100%;
    border: 2px solid #e0e0e0;
    border-radius: 9px;
    padding: 13px 16px;
    font-size: 0.97rem;
    font-family: 'DM Sans', sans-serif;
    color: #1a1a2e;
    outline: none;
    transition: border-color .2s;
    background: #fafafa;
}
.cv-field input:focus {
    border-color: #1a1a2e;
    background: #fff;
}
.cv-field input::placeholder { color: #bbb; }

/* ── Code row: fixed prefix + input ── */
.cv-code-row {
    display: flex;
    align-items: center;
    border: 2px solid #e0e0e0;
    border-radius: 9px;
    overflow: hidden;
    background: #fafafa;
    transition: border-color .2s;
}
.cv-code-row:focus-within {
    border-color: #1a1a2e;
    background: #fff;
}

.cv-prefix {
    padding: 13px 0 13px 16px;
    font-size: 0.97rem;
    font-family: 'DM Sans', sans-serif;
    color: #9ca3af;
    white-space: nowrap;
    font-weight: 500;
    letter-spacing: 0.04em;
    user-select: none;
}

.cv-code-row input {
    flex: 1;
    border: none !important;
    border-radius: 0 !important;
    padding: 13px 16px 13px 4px !important;
    font-size: 0.97rem !important;
    font-family: 'DM Sans', sans-serif !important;
    color: #1a1a2e !important;
    outline: none !important;
    background: transparent !important;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 600 !important;
}
.cv-code-row input::placeholder {
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #ccc !important;
    font-weight: 400 !important;
}

/* ── Verify button ── */
#cv-btn {
    width: 100%;
    background: #1a1a2e;
    color: #fff;
    border: none;
    border-radius: 9px;
    padding: 14px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    transition: background .2s, transform .1s;
    margin-top: 4px;
    letter-spacing: 0.02em;
}
#cv-btn:hover { background: #2d2d4e; }
#cv-btn:active { transform: scale(0.98); }
#cv-btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ── Loading dots ── */
.cv-loading {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 24px 0 8px;
}
.cv-loading span {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: #1a1a2e;
    animation: cv-bounce 0.6s infinite alternate;
}
.cv-loading span:nth-child(2) { animation-delay: .2s; }
.cv-loading span:nth-child(3) { animation-delay: .4s; }
@keyframes cv-bounce { to { transform: translateY(-7px); opacity: 0.3; } }

/* ── Result Cards ── */
.cv-card {
    border-radius: 12px;
    padding: 22px 24px;
    margin-top: 20px;
    animation: cv-fadein .3s ease;
}
@keyframes cv-fadein { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }

.cv-valid   { background: #f0fdf4; border: 1.5px solid #86efac; }
.cv-expired { background: #fffbeb; border: 1.5px solid #fcd34d; }
.cv-invalid { background: #fef2f2; border: 1.5px solid #fca5a5; }

.cv-status-icon { font-size: 2rem; font-weight: 700; line-height: 1; margin-bottom: 6px; }
.cv-valid   .cv-status-icon { color: #16a34a; }
.cv-expired .cv-status-icon { color: #d97706; }
.cv-invalid .cv-status-icon { color: #dc2626; }

.cv-status-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 4px;
}
.cv-valid   .cv-status-title { color: #15803d; }
.cv-expired .cv-status-title { color: #92400e; }
.cv-invalid .cv-status-title { color: #991b1b; }

.cv-status-msg { color: #4b5563; font-size: 0.85rem; margin-bottom: 16px; line-height: 1.6; }

.cv-details { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.cv-details tr { border-bottom: 1px solid rgba(0,0,0,0.07); }
.cv-details tr:last-child { border-bottom: none; }
.cv-details th { text-align: left; padding: 8px 0; color: #6b7280; font-weight: 500; width: 42%; vertical-align: top; }
.cv-details td { padding: 8px 0; color: #1a1a2e; font-weight: 600; }

/* ── Mobile ── */
@media(max-width:480px) {
    .cv-search-box { padding: 28px 20px 24px; }
    .cv-details th, .cv-details td { display: block; width: 100%; }
    .cv-details th { color: #9ca3af; font-size: 0.75rem; padding-bottom: 0; }
}
