/* BP Certificate Manager - Frontend Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

.bpcert-verify-wrap {
    font-family: 'Inter', sans-serif;
    padding: 40px 20px;
}

.bpcert-verify-card {
    max-width: 580px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,.12);
    overflow: hidden;
}

.bpcert-verify-header {
    background: linear-gradient(135deg, #1a3c5e 0%, #2980b9 100%);
    color: #fff;
    padding: 40px 30px 30px;
    text-align: center;
}
.bpcert-verify-icon { font-size: 48px; margin-bottom: 10px; }
.bpcert-verify-header h2 { font-size: 24px; font-weight: 700; margin: 0 0 6px; }
.bpcert-verify-header p { opacity: .85; font-size: 14px; margin: 0; }

.bpcert-verify-form { padding: 30px; }

.bpcert-input-group {
    display: flex;
    gap: 10px;
}
.bpcert-input-group input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: border-color .2s;
    outline: none;
}
.bpcert-input-group input:focus { border-color: #2980b9; }
.bpcert-input-group button {
    background: linear-gradient(135deg, #1a3c5e, #2980b9);
    color: #fff;
    border: none;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity .2s;
}
.bpcert-input-group button:hover { opacity: .9; }

/* Result Card */
.bpcert-result-card {
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,.12);
    overflow: hidden;
    background: #fff;
}
.bpcert-result-header {
    padding: 35px 30px;
    text-align: center;
    color: #fff;
}
.bpcert-result-header.valid { background: linear-gradient(135deg, #27ae60, #2ecc71); }
.bpcert-result-header.revoked { background: linear-gradient(135deg, #c0392b, #e74c3c); }
.bpcert-result-header.not-found { background: linear-gradient(135deg, #7f8c8d, #95a5a6); }
.bpcert-result-icon { font-size: 52px; margin-bottom: 10px; }
.bpcert-result-header h2 { font-size: 24px; font-weight: 700; margin: 0 0 5px; }
.bpcert-result-header p { opacity: .9; margin: 0; font-size: 14px; }

.bpcert-result-body { padding: 20px 30px; }
.bpcert-result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}
.bpcert-result-row:last-child { border-bottom: none; }
.bpcert-result-row span { color: #888; }
.bpcert-result-row strong { color: #1a3c5e; font-weight: 600; }

.bpcert-status-badge.valid { color: #27ae60; }
.bpcert-status-badge.revoked { color: #e74c3c; }

.bpcert-verified-note {
    margin: 0 30px 25px;
    background: #f0fff4;
    border: 1px solid #a9d6b5;
    border-radius: 10px;
    padding: 16px 20px;
    font-size: 13px;
    color: #2d6a4f;
    line-height: 1.6;
}
.bpcert-verified-note p { margin: 0 0 5px; }
.bpcert-verified-note p:last-child { margin: 0; }

/* Loading */
.bpcert-loading {
    text-align: center;
    padding: 30px;
    color: #888;
    font-size: 15px;
}
.bpcert-spinner {
    width: 36px; height: 36px;
    border: 3px solid #e0e0e0;
    border-top-color: #2980b9;
    border-radius: 50%;
    animation: bpcert-spin .7s linear infinite;
    margin: 0 auto 12px;
}
@keyframes bpcert-spin { to { transform: rotate(360deg); } }

/* ===== Photo & Certificate Image ===== */
.bpcert-result-page { max-width: 800px; margin: 0 auto; }

.bpcert-info-row {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    padding: 20px 30px;
}

/* Student Photo */
.bpcert-student-photo-wrap {
    flex-shrink: 0;
    text-align: center;
}
.bpcert-student-photo {
    width: 110px;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
    border: 3px solid #c9a84c;
    box-shadow: 0 4px 15px rgba(0,0,0,.15);
    display: block;
}
.bpcert-photo-name {
    font-size: 12px;
    color: #666;
    margin-top: 6px;
    max-width: 110px;
    word-break: break-word;
    text-align: center;
}

/* Info body without photo wrapping */
.bpcert-info-row .bpcert-result-body {
    flex: 1;
    padding: 0;
}
.bpcert-info-row .bpcert-result-row {
    border-bottom: 1px solid #f0f0f0;
    padding: 10px 0;
}

/* Certificate Image Section */
.bpcert-cert-image-section {
    padding: 20px 30px 25px;
    border-top: 1px solid #f0f0f0;
}
.bpcert-cert-image-section h3 {
    font-size: 16px;
    color: #1a3c5e;
    margin: 0 0 14px;
    font-weight: 700;
}
.bpcert-cert-img-wrap { position: relative; text-align: center; }
.bpcert-cert-full-img {
    max-width: 100%;
    border-radius: 10px;
    border: 1px solid #ddd;
    box-shadow: 0 4px 20px rgba(0,0,0,.1);
    transition: transform .3s ease, box-shadow .3s ease;
    cursor: zoom-in;
}
.bpcert-cert-full-img.zoomed {
    transform: scale(1.6);
    box-shadow: 0 20px 60px rgba(0,0,0,.35);
    cursor: zoom-out;
    position: relative;
    z-index: 100;
}

.bpcert-cert-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 14px;
    flex-wrap: wrap;
}
.bpcert-btn-zoom, .bpcert-btn-download, .bpcert-btn-back {
    display: inline-block;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: opacity .2s;
}
.bpcert-btn-zoom {
    background: #f0f4f8;
    color: #1a3c5e;
    border: 1px solid #ccd;
}
.bpcert-btn-download {
    background: linear-gradient(135deg, #1a3c5e, #2980b9);
    color: #fff;
}
.bpcert-btn-back {
    background: #f0f4f8;
    color: #1a3c5e;
    border: 1px solid #ccd;
}
.bpcert-btn-zoom:hover, .bpcert-btn-download:hover, .bpcert-btn-back:hover { opacity: .85; }

/* Mobile */
@media (max-width: 560px) {
    .bpcert-info-row { flex-direction: column; align-items: center; padding: 20px 16px; }
    .bpcert-student-photo { width: 90px; height: 115px; }
    .bpcert-cert-image-section { padding: 16px; }
    .bpcert-cert-full-img.zoomed { transform: scale(1.3); }
}
