/* Certificate Verifier Styles */

/* Main Verification Container */
.tbvs-verification-page {
    min-height: 60vh;
    padding: 40px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.tbvs-certificate-verifier {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Verification Form */
.verification-form {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f0f0f1;
}

.verification-form h2 {
    margin: 0 0 20px 0;
    color: #23282d;
    font-size: 28px;
    font-weight: 600;
}

.verification-form p {
    margin: 0 0 25px 0;
    color: #666;
    font-size: 16px;
    line-height: 1.5;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #23282d;
    font-size: 16px;
}

.certificate-code-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 18px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    background: #fafbfc;
}

.certificate-code-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0,115,170,0.1);
    background: #fff;
}

.certificate-code-input::placeholder {
    color: #999;
    font-weight: normal;
    letter-spacing: normal;
}

/* Verify Button */
#verify-certificate-btn {
    width: 100%;
    padding: 15px 30px;
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 10px;
}

#verify-certificate-btn:hover {
    background: linear-gradient(135deg, #005a87 0%, #004a73 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,115,170,0.3);
}

#verify-certificate-btn:active {
    transform: translateY(0);
}

#verify-certificate-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Loading State */
.verification-result .loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.verification-result .loading p {
    margin: 15px 0 0 0;
    font-size: 16px;
}

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    animation: tbvs-spin 1s linear infinite;
    margin-bottom: 15px;
}

/* Certificate Info Display */
.certificate-info {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-top: 20px;
}

.certificate-header {
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: #fff;
    padding: 25px 30px;
    text-align: center;
}

.certificate-header h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 600;
}

.certificate-status {
    margin-top: 15px;
}

.status-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.status-active {
    background: rgba(0,163,42,0.2);
    color: #00a32a;
    border: 2px solid rgba(0,163,42,0.3);
}

.status-badge.status-used {
    background: rgba(100,105,112,0.2);
    color: #646970;
    border: 2px solid rgba(100,105,112,0.3);
}

.status-badge.status-expired {
    background: rgba(214,54,56,0.2);
    color: #d63638;
    border: 2px solid rgba(214,54,56,0.3);
}

/* Certificate Details */
.certificate-details {
    padding: 30px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f1;
}

.detail-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.detail-row strong {
    color: #23282d;
    font-weight: 600;
    min-width: 40%;
}

.detail-row span:not(strong) {
    color: #555;
    text-align: right;
    flex: 1;
}

.certificate-code {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    background: #f0f0f1;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 16px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.certificate-code:hover {
    background: #e1e5e9;
}

/* Certificate Actions */
.certificate-actions {
    padding: 20px 30px;
    background: #f8f9fa;
    border-top: 1px solid #f0f0f1;
    text-align: center;
}

.certificate-actions .btn {
    display: inline-block;
    padding: 12px 25px;
    margin: 0 5px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.btn-secondary {
    background: #6c757d;
    color: #fff;
}

.btn-secondary:hover {
    background: #5a6268;
    color: #fff;
    transform: translateY(-1px);
}

/* Admin Actions */
.admin-actions {
    padding: 20px 30px;
    background: #fff3cd;
    border-top: 1px solid #ffeaa7;
    text-align: center;
}

.admin-actions h4 {
    margin: 0 0 15px 0;
    color: #856404;
    font-size: 16px;
}

#confirm-certificate-btn {
    background: #dc3545;
    color: #fff;
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#confirm-certificate-btn:hover {
    background: #c82333;
    transform: translateY(-1px);
}

/* Status-specific styles */
.certificate-info.status-active {
    border-left: 5px solid #00a32a;
}

.certificate-info.status-used {
    border-left: 5px solid #646970;
    opacity: 0.8;
}

.certificate-info.status-expired {
    border-left: 5px solid #d63638;
}

.certificate-info.status-used .certificate-header {
    background: linear-gradient(135deg, #646970 0%, #50555c 100%);
}

.certificate-info.status-expired .certificate-header {
    background: linear-gradient(135deg, #d63638 0%, #b32d2e 100%);
}

/* Error States */
.verification-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    color: #721c24;
    margin-top: 20px;
}

.verification-error h4 {
    margin: 0 0 10px 0;
    color: #721c24;
}

.verification-error p {
    margin: 0;
    font-size: 16px;
}

/* Success Messages */
.verification-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    color: #155724;
    margin-top: 20px;
}

.verification-success h4 {
    margin: 0 0 10px 0;
    color: #155724;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tbvs-certificate-verifier {
        margin: 10px;
        padding: 20px;
    }
    
    .certificate-header {
        padding: 20px;
    }
    
    .certificate-header h3 {
        font-size: 20px;
    }
    
    .certificate-details {
        padding: 20px;
    }
    
    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .detail-row span:not(strong) {
        text-align: left;
    }
    
    .certificate-actions,
    .admin-actions {
        padding: 15px 20px;
    }
    
    .certificate-actions .btn {
        display: block;
        margin: 5px 0;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .tbvs-verification-page {
        padding: 20px 0;
    }
    
    .verification-form h2 {
        font-size: 24px;
    }
    
    .certificate-code-input {
        padding: 12px 15px;
        font-size: 16px;
    }
    
    #verify-certificate-btn {
        padding: 12px 20px;
        font-size: 16px;
    }
    
    .certificate-header h3 {
        font-size: 18px;
    }
    
    .certificate-code {
        font-size: 14px;
        padding: 4px 8px;
    }
}

/* Animation Keyframes */
@keyframes tbvs-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Certificate Info Animation */
.certificate-info {
    animation: fadeInUp 0.5s ease-out;
}

/* Button Pulse Animation */
#verify-certificate-btn:focus {
    animation: pulse 0.3s ease-in-out;
}

/* Copy Feedback Animation */
.certificate-code.copied {
    background: #00a32a !important;
    color: #fff !important;
    animation: pulse 0.3s ease-in-out;
}

/* QR Code Styling (if present) */
.certificate-qr-code {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
}

.certificate-qr-code img {
    max-width: 150px;
    height: auto;
    border: 2px solid #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Print Styles */
@media print {
    .tbvs-verification-page {
        background: none;
        padding: 0;
    }
    
    .verification-form,
    .admin-actions {
        display: none;
    }
    
    .certificate-info {
        box-shadow: none;
        border: 2px solid #000;
    }
    
    .certificate-header {
        background: #000 !important;
        color: #fff !important;
    }
}
