/* Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto; /* 5% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 90%; /* Responsive width */
    max-width: 500px; /* Max width on larger screens */
    max-height: 90vh; /* Max height relative to viewport */
    overflow-y: auto; /* Scroll inside modal if content is tall */
    border-radius: 8px;
    position: relative;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .modal-content {
        width: 95%;
        max-width: none;
        margin: 2% auto;
        max-height: 85vh;
    }
}

@media (min-width: 768px) {
    .modal-content {
        width: 80%;
        max-width: 600px;
        margin: 4% auto;
        max-height: 85vh;
    }
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
}

#loading-spinner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
    border-radius: 8px;
}

.spinner {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #3498db;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Textarea styling */
textarea#query {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Ensures padding doesn't affect overall width */
    resize: vertical; /* Allows vertical resizing */
}

/* Professional Card Styling */
.card {
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    border: none; /* Remove default border */
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.card .card-title i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #0d6efd; /* Bootstrap primary color */
}

/* Footer Styling */
.footer {
    background-color: #f8f9fa; /* Light grey background */
    padding: 2rem 0;
    color: #6c757d; /* Muted text color */
}

.footer a {
    color: #6c757d;
    text-decoration: none;
}

.footer a:hover {
    color: #212529; /* Darker text on hover */
}
