/* Certificate Lookup Plugin Styles */

.cert-lookup-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
}

.cert-lookup-form-container {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    border: 1px solid #e1e5e9;
    margin-bottom: 30px;
}

.cert-lookup-title {
    text-align: center;
    color: #2c3e50;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 25px;
    margin-top: 0;
}

.cert-lookup-form {
    max-width: 500px;
    margin: 0 auto;
}

.cert-lookup-input-group {
    display: flex;
    gap: 10px;
    align-items: stretch;
    margin-bottom: 20px;
}

.cert-lookup-input {
    flex: 1;
    padding: 15px 20px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: all 0.3s ease;
    outline: none;
}

.cert-lookup-input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.cert-lookup-button {
    padding: 15px 25px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 140px;
    justify-content: center;
}

.cert-lookup-button:hover {
    background: linear-gradient(135deg, #2980b9, #1f4e79);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.cert-lookup-button:active {
    transform: translateY(0);
}

.cert-lookup-button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.loading-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Results Section */
.cert-lookup-results {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    border: 1px solid #e1e5e9;
    overflow: hidden;
    margin-top: 30px;
}

.cert-results-header {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    padding: 20px 25px;
    border-bottom: 1px solid #e1e5e9;
}

.cert-results-header h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 600;
}

.cert-results-header p {
    margin: 0;
    opacity: 0.9;
}

.cert-results-content {
    padding: 25px;
}

/* Student Info Card */
.student-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    margin-bottom: 25px;
}

.student-info h4 {
    color: #2c3e50;
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
}

.student-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.student-detail {
    display: flex;
    flex-direction: column;
}

.student-detail strong {
    color: #34495e;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.student-detail span {
    color: #2c3e50;
    font-size: 14px;
}

/* Certificates List */
.certificates-section h4 {
    color: #2c3e50;
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.certificates-count {
    background: #3498db;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.certificate-card {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.certificate-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.certificate-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #e74c3c, #f39c12, #f1c40f, #27ae60, #3498db, #9b59b6);
}

.certificate-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.certificate-number {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.certificate-type {
    background: #ecf0f1;
    color: #34495e;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.certificate-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.certificate-detail {
    display: flex;
    flex-direction: column;
}

.certificate-detail strong {
    color: #7f8c8d;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.certificate-detail span {
    color: #2c3e50;
    font-size: 14px;
    font-weight: 500;
}

.certificate-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 15px;
    border-top: 1px solid #ecf0f1;
}

.verify-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #27ae60;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.verify-link:hover {
    background: #219a52;
    color: white;
    text-decoration: none;
}

/* Error Message */
.cert-error {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin-top: 20px;
}

.cert-error-icon {
    font-size: 48px;
    color: #e53e3e;
    margin-bottom: 15px;
    display: block;
}

.cert-error h4 {
    color: #e53e3e;
    margin: 0 0 10px 0;
    font-size: 18px;
}

.cert-error p {
    color: #a0aec0;
    margin: 0;
}

/* No Certificates Found */
.no-certificates {
    text-align: center;
    padding: 40px 20px;
    color: #7f8c8d;
}

.no-certificates .icon {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
}

.no-certificates h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.no-certificates p {
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cert-lookup-wrapper {
        padding: 15px;
    }

    .cert-lookup-form-container {
        padding: 20px;
    }

    .cert-lookup-title {
        font-size: 24px;
    }

    .cert-lookup-input-group {
        flex-direction: column;
    }

    .cert-lookup-button {
        width: 100%;
    }

    .certificate-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .student-details,
    .certificate-details {
        grid-template-columns: 1fr;
    }

    .certificate-actions {
        flex-direction: column;
    }

    .verify-link {
        justify-content: center;
    }
}

/* Loading State */
.cert-lookup-loading {
    text-align: center;
    padding: 40px 20px;
    color: #7f8c8d;
}

.cert-lookup-loading .spinner {
    font-size: 24px;
    margin-bottom: 15px;
    display: block;
    animation: spin 1s linear infinite;
}

/* Success Animation */
.cert-results-appear {
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Print Styles */
@media print {
    .cert-lookup-form-container {
        display: none;
    }

    .cert-lookup-results {
        box-shadow: none;
        border: 1px solid #000;
    }

    .certificate-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}