/*
 * This file contains all the CSS styles for the scholarship application form.
 * The styles were extracted from the <style> block in the original HTML file.
 */

:root {
    --primary: #3498db;
    --secondary: #2ecc71;
    --dark: #2c3e50;
    --light: #f4f7f6;
}

.logo {
    height: 60px; /* Adjust as needed for desktop */
    width: auto;
    display: block;
}
.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}
@media (max-width: 768px) {
    .logo {
        height: 45px; /* Smaller size for mobile devices */
    }
    .logo-text {
        font-size: 1.2rem;
    }
}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--light);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary) !important;
}

.hero-section {
    background: linear-gradient(135deg, var(--primary), #2c97d3);
    color: white;
    padding: 6rem 0;
}

.application-form {
    background: white;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    padding: 3rem;
    margin-top: -50px;
    position: relative;
    z-index: 10;
}

.form-section {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.form-title {
    color: var(--primary);
    margin-bottom: 2rem;
    font-weight: 600;
}

.btn-primary {
    background-color: var(--primary);
    border: none;
    padding: 14px 30px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

footer {
    background-color: var(--dark);
    color: white;
    padding: 3.5rem 0;
    margin-top: 4rem;
}

.error-message {
    color: #dc3545;
    font-size: 0.85rem;
    display: none;
    margin-top: 0.25rem;
}

.upload-progress {
    margin-top: 0.5rem;
    display: none;
}

.progress-bar {
    transition: width 0.3s ease;
}

.upload-status {
    font-size: 0.8rem;
    margin-top: 0.2rem;
    color: var(--dark);
}

.file-preview {
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.file-preview-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.3rem;
    color: #555;
}

.file-preview-item i {
    margin-right: 0.5rem;
    color: var(--primary);
}

/* Example of CSS for form validation */
.error-message {
    color: #dc3545; /* Red color for error messages */
    font-size: 0.85rem;
    display: none;
    margin-top: 0.25rem;
}

/* Visually show invalid state with a red border */
input.is-invalid {
    border-color: #dc3545 !important;
}

/* Visually show valid state with a green border */
input.is-valid {
    border-color: #2ecc71 !important;
}

.confirmation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.5s ease-in-out;
    text-align: center;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.confirmation-overlay .confirmation-content {
    background: white;
    padding: 3rem;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
    max-width: 600px;
    width: 90%;
    transform: scale(0.9);
    animation: scaleIn 0.5s forwards;
}

@keyframes scaleIn { from { transform: scale(0.9); } to { transform: scale(1); } }

.confirmation-overlay .bi-check-circle-fill {
    font-size: 4rem;
    color: var(--secondary);
    margin-bottom: 1.5rem;
}

.confirmation-overlay h1 {
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 1rem;
}

/* New CSS class for the spinner */
.spinner-hide {
    display: none;
}

/* Tooltip styles */
/* Tooltip styles - ADJUSTED FOR MOBILE RESPONSIVENESS */
.tooltip-container {
    position: relative;
    display: inline-block;
}

.tooltip-icon {
    font-size: 0.7rem;
    color: #888;
    cursor: pointer;
    margin-left: 4px;
}

.tooltip-popup {
    visibility: hidden;
    background-color: var(--dark);
    color: white;
    text-align: left; /* Aligns text to the left */
    border-radius: 6px;
    padding: 9px;
    position: absolute;
    z-index: 100;
    top: 120%;
    /* New Positioning for mobile-friendly display */
    left: auto; /* Aligns the tooltip to the left edge of its container */
    right: auto; /* Resets the right property */
    transform: none; /* Removes the horizontal centering transform */
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
    /* Adjusted for mobile responsiveness */
    width: max-content;
    max-width: calc(80vw - 40px); /* 40px margin from both sides */
    word-wrap: break-word;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tooltip-popup::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 10px; /* Adjusts pointer to be near the icon */
    transform: none; /* Removes the centering transform for the pointer */
    border-width: 4px;
    border-style: solid;
    border-color: transparent transparent var(--dark) transparent;
}

/* Media query to handle mobile-specific adjustments */
@media (max-width: 768px) {
    .tooltip-popup {
        /* On small screens, position to the left of the container to prevent it from bleeding off */
        right: auto;
        left: 0;
    }
}

.tooltip-popup.show {
    visibility: visible;
    opacity: 1;
}