/* Custom styles for Official Letter Verification - Bootstrap Enhanced */

:root {
    --bs-primary: #3f6538;
    --bs-primary-darker: #324f2d;
    --bs-secondary: #f8a93e;
    --bs-secondary-darker: #e99929;
    --border-radius: 8px;
    --primary-color: #3f6538;
    --success-color: #3f6538;
    --error-color: #dc3545;
}

/* Global styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Make sure content pushes footer down */
.container.py-5 {
    flex: 1;
}

/* Card styling */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 10px;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

/* RTL support for Arabic */
[dir="rtl"] .me-2 {
    margin-left: 0.5rem !important;
    margin-right: 0 !important;
}

[dir="rtl"] .ms-auto {
    margin-left: 0 !important;
    margin-right: auto !important;
}

/* Language button styling */
.language-btn {
    transition: all 0.3s ease;
    font-weight: 500;
}

.language-btn.active {
    background-color: white !important;
    color: var(--bs-primary) !important;
}

.result-container {
    width: 100%;
    margin: 30px auto;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: var(--border-radius);
}

.result-box {
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.success {
    background-color: #e8f5e9;
    border-left: 5px solid var(--success-color);
    color: #2e7d32;
}

.error {
    background-color: #ffebee;
    border-left: 5px solid var(--error-color);
    color: #c62828;
}

.hidden {
    display: none;
}

.instructions {
    background-color: #e3f2fd;
    padding: 25px;
    border-radius: var(--border-radius);
    border-left: 5px solid var(--primary-color);
    margin-top: 20px;
}

.instructions h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.instructions p {
    text-align: left;
    font-size: 1rem;
    margin-bottom: 10px;
}

.information {
    margin-top: 30px;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border-left: 4px solid var(--primary-color);
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Letter field styling */
.letter-info {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 15px;
}

.letter-field {
    display: flex;
    margin-bottom: 15px;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.field-label {
    min-width: 200px;
    
    color: var(--bs-primary);
}

.field-value {
    flex: 1;
	
}

/* University branding styles */
.university-logo {
    height: 40px;
    width: auto;
}

.university-name {
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.1;
}

.btn-primary {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: var(--bs-primary-darker) !important;
    border-color: var(--bs-primary-darker) !important;
}

.btn-outline-primary {
    color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.btn-outline-primary:hover, .btn-outline-primary:focus, .btn-outline-primary:active {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
}

.text-primary {
    color: var(--bs-primary) !important;
}

.bg-primary {
    background-color: var(--bs-primary) !important;
}

.text-secondary {
    color: var(--bs-secondary) !important;
}

.bg-secondary {
    background-color: var(--bs-secondary) !important;
}

/* Footer styling */
footer {
    text-align: center;
    padding: 15px 0;
    color: white;
    font-size: 0.9rem;
}

footer a {
    color: var(--bs-secondary) !important;
}

footer a:hover {
    color: white !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .letter-field {
        flex-direction: column;
    }
    
    .field-label {
        margin-bottom: 10px;
        min-width: 100%;
    }
    
    .university-name {
        font-size: 0.8rem;
    }
    
    .university-logo {
        height: 30px;
    }
}

@media (max-width: 576px) {
    .container {
        margin: 10px;
        padding: 20px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .language-switcher {
        position: static;
        justify-content: center;
        margin-bottom: 20px;
    }
}
