/* Frontend Styles for Diploma Management System */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@300;400;500;600;700&display=swap');

/* Main Container */
.diploma-verification-container,
.diploma-search-results {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
}

/* Institute Header */
.institute-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 124, 186, 0.3);
}

.institute-header h2 {
    margin: 0 0 10px 0;
    font-size: 2.5em;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.institute-header p {
    margin: 0;
    font-size: 1.2em;
    opacity: 0.9;
}

/* Verification Form Section */
.verification-form-section {
    background: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    text-align: center;
}

.verification-form-section h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.8em;
}

.verification-description {
    color: #666;
    font-size: 1.1em;
    margin-bottom: 30px;
}

/* Search Options */
.search-options {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
}

.radio-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 500;
}

.radio-option input[type="radio"] {
    margin-right: 10px;
    transform: scale(1.2);
}

.radio-option input[type="radio"]:checked + .radio-label {
    color: #007cba;
}

/* Search Input Container */
.search-input-container {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    gap: 0;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.search-input-container input {
    flex: 1;
    padding: 15px 25px;
    border: none;
    font-size: 1.1em;
    outline: none;
}

.search-input-container input::placeholder {
    color: #999;
}

.verify-button {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.verify-button:hover {
    background: linear-gradient(135deg, #005a87 0%, #004566 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 124, 186, 0.3);
}

.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Verification Results */
.verification-results {
    background: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.verification-results h3 {
    color: #333;
    margin-bottom: 30px;
    text-align: center;
    font-size: 1.8em;
}

.diploma-card {
    border: 2px solid #007cba;
    border-radius: 10px;
    overflow: hidden;
    background: #fafafa;
}

.diploma-header {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.diploma-header h4 {
    margin: 0;
    font-size: 1.4em;
}

.verified-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
}

.diploma-details {
    padding: 30px;
}

.detail-row {
    display: flex;
    margin-bottom: 15px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: #333;
    min-width: 150px;
    margin-right: 20px;
}

.detail-value {
    color: #555;
    flex: 1;
}

.diploma-link {
    color: #007cba;
    text-decoration: none;
    font-weight: 600;
    padding: 10px 20px;
    border: 2px solid #007cba;
    border-radius: 5px;
    display: inline-block;
    transition: all 0.3s ease;
}

.diploma-link:hover {
    background: #007cba;
    color: white;
}

.diploma-footer {
    background: #f8f9fa;
    padding: 20px 30px;
    border-top: 1px solid #eee;
    text-align: center;
}

.verification-note {
    color: #666;
    margin-bottom: 10px;
    font-style: italic;
}

.verification-date {
    color: #999;
    font-size: 0.9em;
}

/* Verification Actions */
.verification-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.print-button,
.new-search-button {
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.print-button {
    background: #28a745;
    color: white;
}

.print-button:hover {
    background: #218838;
    transform: translateY(-2px);
}

.new-search-button {
    background: #6c757d;
    color: white;
}

.new-search-button:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* Verification Error */
.verification-error {
    background: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    text-align: center;
}

.error-icon {
    font-size: 3em;
    margin-bottom: 20px;
}

.verification-error h3 {
    color: #dc3545;
    margin-bottom: 15px;
}

.verification-error p {
    color: #666;
    margin-bottom: 25px;
}

.try-again-button {
    background: #dc3545;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.try-again-button:hover {
    background: #c82333;
    transform: translateY(-2px);
}

/* Search Results Page Styles */
.search-form-container {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.search-form-inline {
    display: flex;
    justify-content: center;
    gap: 15px;
    align-items: center;
}

.search-input-group {
    display: flex;
    gap: 0;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    width: 100%;
}

.search-input-group input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    font-size: 1em;
    outline: none;
}

.search-input-group select {
    padding: 12px 15px;
    border: none;
    background: #f8f9fa;
    font-size: 1em;
    outline: none;
    border-left: 1px solid #ddd;
}

.search-button {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-button:hover {
    background: linear-gradient(135deg, #005a87 0%, #004566 100%);
    transform: translateY(-2px);
}

/* Success and Error Messages */
.search-success,
.search-error {
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    text-align: center;
}

.search-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.search-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.success-icon,
.error-icon {
    font-size: 2em;
    margin-bottom: 15px;
}

/* Result Card */
.diploma-result-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.result-header {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-header h4 {
    margin: 0;
    font-size: 1.4em;
}

.status-verified {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
}

.result-details {
    padding: 30px;
}

.detail-item {
    display: flex;
    margin-bottom: 15px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item strong {
    min-width: 150px;
    margin-right: 20px;
    color: #333;
}

.detail-item span {
    color: #555;
    flex: 1;
}

.diploma-file-link {
    color: #007cba;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 16px;
    border: 2px solid #007cba;
    border-radius: 5px;
    display: inline-block;
    transition: all 0.3s ease;
}

.diploma-file-link:hover {
    background: #007cba;
    color: white;
}

.result-actions {
    padding: 20px 30px;
    background: #f8f9fa;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.print-btn,
.share-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.print-btn {
    background: #28a745;
    color: white;
}

.print-btn:hover {
    background: #218838;
    transform: translateY(-2px);
}

.share-btn {
    background: #007cba;
    color: white;
}

.share-btn:hover {
    background: #005a87;
    transform: translateY(-2px);
}

/* No Results */
.no-results {
    background: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.no-results h4 {
    color: #dc3545;
    margin-bottom: 15px;
}

.no-results p {
    color: #666;
    margin-bottom: 15px;
}

.suggestion {
    color: #999;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .diploma-verification-container,
    .diploma-search-results {
        padding: 15px;
    }

    .institute-header {
        padding: 20px;
    }

    .institute-header h2 {
        font-size: 2em;
    }

    .verification-form-section,
    .verification-results,
    .verification-error {
        padding: 25px 20px;
    }

    .search-options {
        flex-direction: column;
        gap: 15px;
    }

    .search-input-container {
        flex-direction: column;
        border-radius: 10px;
    }

    .search-input-container input {
        border-radius: 10px 10px 0 0;
    }

    .verify-button {
        border-radius: 0 0 10px 10px;
    }

    .detail-row {
        flex-direction: column;
    }

    .detail-label {
        margin-bottom: 5px;
        margin-right: 0;
        min-width: auto;
    }

    .verification-actions,
    .result-actions {
        flex-direction: column;
        gap: 15px;
    }

    .search-form-inline {
        flex-direction: column;
        gap: 15px;
    }

    .search-input-group {
        flex-direction: column;
        border-radius: 10px;
    }

    .search-input-group input,
    .search-input-group select {
        border-radius: 0;
    }

    .search-input-group input:first-child {
        border-radius: 10px 10px 0 0;
    }

    .search-input-group select {
        border-radius: 0;
        border-left: none;
        border-top: 1px solid #ddd;
    }

    .search-button {
        border-radius: 0 0 10px 10px;
    }
}

@media (max-width: 480px) {
    .institute-header h2 {
        font-size: 1.8em;
    }

    .verification-form-section h3,
    .verification-results h3 {
        font-size: 1.5em;
    }

    .diploma-header,
    .result-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

/* Modern Search Results Styling */
.diploma-result-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.result-header {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 15px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.result-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.header-content {
    position: relative;
    z-index: 2;
}

.header-content h4 {
    margin: 0 0 6px 0;
    font-size: 1.2em;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.verification-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.8em;
    font-weight: 600;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.verified-icon {
    font-size: 1em;
}

.header-subtitle {
    margin-top: 10px;
    opacity: 0.9;
    font-size: 0.9em;
    position: relative;
    z-index: 2;
}

.result-body {
    padding: 20px;
}

.student-photo-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 18px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.photo-placeholder {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2em;
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.student-basic-info {
    flex: 1;
}

.student-name {
    margin: 0 0 4px 0;
    font-size: 1.3em;
    font-weight: 700;
    color: #1e293b;
    font-family: 'Poppins', sans-serif;
}

.student-details {
    margin: 0;
    color: #64748b;
    font-size: 1em;
}

.diploma-details-grid {
    display: grid;
    gap: 8px;
}

.detail-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.detail-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.detail-label {
    display: flex;
    align-items: center;
    gap: 3px;
    min-width: 120px;
    font-weight: 600;
    color: #374151;
}

.label-icon {
    font-size: 0.95em;
    color: #3b82f6;
}

.detail-content {
    flex: 1;
}

.course-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.course-name {
    font-size: 1em;
    font-weight: 700;
    color: #1e293b;
    font-family: 'Poppins', sans-serif;
}

.course-duration {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.7em;
    font-weight: 600;
    display: inline-block;
    width: fit-content;
}

.cnic-number {
    font-size: 1em;
    font-weight: 600;
    color: #059669;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

.completion-date {
    font-size: 1em;
    font-weight: 600;
    color: #7c3aed;
}

.certificate-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    text-decoration: none;
    padding: 7px 12px;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.certificate-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

.link-icon {
    font-size: 0.95em;
}

.result-footer {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
    padding: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.verification-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.verification-info p {
    margin: 0;
    font-size: 0.8em;
    opacity: 0.8;
}

.result-actions {
    display: flex;
    gap: 12px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.print-btn {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.print-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.share-btn {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.4);
}

.btn-icon {
    font-size: 0.95em;
}

/* Enhanced No Results Styling */
.no-results {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    padding: 20px 16px;
    border-radius: 10px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.1);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.no-results .error-icon {
    font-size: 2.5em;
    margin-bottom: 12px;
    opacity: 0.6;
}

.no-results h4 {
    color: #ef4444;
    margin-bottom: 10px;
    font-size: 1.2em;
    font-weight: 600;
}

.no-results p {
    color: #64748b;
    margin-bottom: 10px;
    font-size: 0.95em;
}

.suggestion {
    color: #94a3b8;
    font-style: italic;
    padding: 10px;
    background: rgba(148, 163, 184, 0.1);
    border-radius: 6px;
    border-left: 4px solid #f59e0b;
    font-size: 0.9em;
}

/* Enhanced Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.diploma-result-card {
    animation: fadeInUp 0.6s ease-out;
}

.detail-row {
    animation: fadeInUp 0.6s ease-out;
}

.detail-row:nth-child(1) { animation-delay: 0.1s; }
.detail-row:nth-child(2) { animation-delay: 0.2s; }
.detail-row:nth-child(3) { animation-delay: 0.3s; }
.detail-row:nth-child(4) { animation-delay: 0.4s; }

/* Mobile Responsive Enhancements */
@media (max-width: 768px) {
    .result-body {
        padding: 15px 10px;
    }

    .student-photo-section {
        flex-direction: column;
        text-align: center;
        padding: 8px;
        gap: 6px;
    }

    .photo-placeholder {
        width: 50px;
        height: 50px;
        font-size: 1.5em;
    }

    .student-name {
        font-size: 1.1em;
    }

    .detail-row {
        flex-direction: column;
        gap: 5px;
        padding: 7px;
    }

    .detail-label {
        min-width: auto;
        justify-content: center;
    }

    .result-footer {
        flex-direction: column;
        gap: 8px;
        text-align: center;
        padding: 10px;
    }

    .result-actions {
        justify-content: center;
        gap: 8px;
    }

    .action-btn {
        padding: 8px 14px;
        font-size: 0.85em;
    }

    .no-results {
        padding: 18px 12px;
        border-radius: 8px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        text-align: center;
        border: 1px solid rgba(255, 255, 255, 0.2);
    }

    .no-results .error-icon {
        font-size: 2em;
        margin-bottom: 8px;
    }

    .no-results h4 {
        font-size: 1.1em;
        margin-bottom: 6px;
    }

    .no-results p {
        font-size: 0.85em;
        margin-bottom: 6px;
    }

    .suggestion {
        padding: 6px;
        font-size: 0.8em;
    }
}