/* ============================================
   CVS - Certificate Verification System
   Public Styles
   ============================================ */

.cvs-verification-wrap {
    max-width: 860px;
    margin: 0 auto;
    padding: 20px 16px;
    font-family: Arial, sans-serif;
}

/* ── Search Box ── */
.cvs-search-box {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-top: 4px solid #2e7d32;
    padding: 28px 24px;
    border-radius: 6px;
    margin-bottom: 28px;
    text-align: center;
}
.cvs-search-box h2 {
    font-size: 22px;
    color: #2e7d32;
    margin-bottom: 8px;
}
.cvs-search-box p {
    color: #666;
    margin-bottom: 18px;
    font-size: 14px;
}
.cvs-input-group {
    display: flex;
    gap: 10px;
    max-width: 520px;
    margin: 0 auto;
    position: relative;
}
.cvs-input-group input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}
.cvs-input-group input:focus { border-color: #2e7d32; }
.cvs-input-group button {
    padding: 12px 24px;
    background: #2e7d32;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}
.cvs-input-group button:hover { background: #1b5e20; }

/* ── Live Results Dropdown ── */
.cvs-live-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 90px;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    max-height: 280px;
    overflow-y: auto;
}
.cvs-live-item {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
    text-align: left;
}
.cvs-live-item:hover { background: #f0f7f0; }
.cvs-live-item .cvs-roll { color: #2e7d32; font-weight: bold; font-size: 12px; }
.cvs-live-item .cvs-trade { color: #888; font-size: 12px; }

/* ── Result Card ── */
.cvs-result-card {
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.cvs-result-header {
    background: #2e7d32;
    color: #fff;
    padding: 14px 20px;
    text-align: center;
}
.cvs-result-header h3 { font-size: 18px; margin: 0; }

.cvs-result-body {
    display: flex;
    gap: 0;
    padding: 0;
}
.cvs-result-table-wrap { flex: 1; }
.cvs-result-table {
    width: 100%;
    border-collapse: collapse;
}
.cvs-result-table tr { border-bottom: 1px solid #eee; }
.cvs-result-table tr:last-child { border-bottom: none; }
.cvs-result-table th {
    padding: 10px 16px;
    background: #f9f9f9;
    font-size: 13px;
    color: #555;
    font-weight: bold;
    width: 38%;
    text-align: left;
    border-right: 1px solid #eee;
}
.cvs-result-table td {
    padding: 10px 16px;
    font-size: 13px;
    color: #222;
}

.cvs-student-photo {
    padding: 20px 16px;
    background: #fafafa;
    border-left: 1px solid #eee;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-width: 130px;
}
.cvs-student-photo img {
    width: 100px;
    height: 120px;
    object-fit: cover;
    border: 2px solid #2e7d32;
}

/* ── Marks Section ── */
.cvs-marks-section { border-top: 2px solid #eee; }
.cvs-marks-header {
    background: #f0f0f0;
    padding: 10px 16px;
    font-weight: bold;
    font-size: 14px;
    color: #333;
    border-bottom: 1px solid #ddd;
}
.cvs-marks-table {
    width: 100%;
    border-collapse: collapse;
}
.cvs-marks-table th {
    background: #f5f5f5;
    padding: 10px 16px;
    font-size: 13px;
    text-align: center;
    border: 1px solid #ddd;
    color: #444;
}
.cvs-marks-table td {
    padding: 12px 16px;
    text-align: center;
    font-size: 14px;
    border: 1px solid #ddd;
}
.cvs-marks-table td strong { font-size: 17px; color: #2e7d32; }

/* ── Result Footer ── */
.cvs-result-footer {
    padding: 16px 20px;
    border-top: 1px solid #eee;
    background: #fafafa;
}
.cvs-result-footer p {
    font-size: 12px;
    color: #777;
    font-style: italic;
    margin-bottom: 14px;
}
.cvs-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.cvs-qr-wrap { text-align: center; }
.cvs-qr-img {
    width: 80px;
    height: 80px;
    border: 1px solid #ddd;
    padding: 3px;
    display: block;
}
.cvs-qr-wrap small {
    display: block;
    font-size: 10px;
    color: #888;
    margin-top: 4px;
}

.cvs-btn-print {
    display: inline-block;
    padding: 10px 22px;
    background: #2e7d32;
    color: #fff !important;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    transition: background 0.2s;
}
.cvs-btn-print:hover { background: #1b5e20; }

/* ── Multiple Results List ── */
.cvs-results-list {
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}
.cvs-results-list h3 {
    background: #f5f5f5;
    padding: 12px 16px;
    font-size: 14px;
    color: #333;
    border-bottom: 1px solid #ddd;
    margin: 0;
}
.cvs-result-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}
.cvs-result-item:last-child { border-bottom: none; }
.cvs-btn-small {
    display: inline-block;
    margin-left: 10px;
    padding: 4px 12px;
    background: #2e7d32;
    color: #fff !important;
    text-decoration: none;
    border-radius: 3px;
    font-size: 12px;
}

/* ── Not Found ── */
.cvs-not-found {
    padding: 30px;
    text-align: center;
    color: #c62828;
    background: #fff3f3;
    border: 1px solid #ffcdd2;
    border-radius: 6px;
    font-size: 15px;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .cvs-input-group { flex-direction: column; }
    .cvs-live-results { right: 0; }
    .cvs-result-body { flex-direction: column; }
    .cvs-student-photo { border-left: none; border-top: 1px solid #eee; }
    .cvs-actions { flex-direction: column; align-items: flex-start; }
}
