/* /app/app.css */

/*
  Flexbox layout for sticky footer
  - body is a flex container, arranging children (header, main, footer) in a column.
  - min-height: 100vh ensures the body is at least as tall as the screen.
  - flex-grow: 1 on the main container makes it expand to push the footer down.
*/
body {
    display: flex;
    flex-direction: column;
}
/* Main container for the app content */
.container {
    flex-grow: 1; /* This makes the main content area expand */
    padding: 24px 5vw;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Align content to the top */
}

/* Style the main filtering card */
.filter-section {
    background: var(--bg-dark);
    border-radius: 16px;
    padding: 2.5rem 3rem 1.5rem; /* Reduced bottom padding */
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    max-width: 700px;
    width: 100%;
    text-align: center;
    margin-top: 0vh; /* Push the card down from the top a bit */
}

.filter-section h1 {
    font-size: 2.2rem;
    color: var(--color-primary);
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -1px;
}

.filter-section p,
.filter-section .subtitle {
    color: var(--text-gray);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
}

.filter-section .subtitle {
    margin-bottom: 2rem;
}

/* Layout for the form controls */
.country-selector {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: left;
}

.access-gate-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    position: relative; /* Needed for positioning the popup balloon */
    text-align: left;
}

.country-selector label {
    display: block;
    font-weight: 500;
    color: var(--text-gray-light);
    margin-bottom: 0.25rem;
}

.access-gate-form label {
    display: block;
    font-weight: 500;
    color: var(--text-gray-light);
    margin-bottom: 0.25rem;
}

/* Custom styling for select dropdowns */
.country-selector select,
.access-gate-form input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--bg-dark-soft);
    color: var(--text-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.country-selector select:hover,
.access-gate-form input[type="text"]:hover {
    border-color: #444;
}

.country-selector select:focus,
.access-gate-form input[type="text"]:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
}

.country-selector select:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Primary button styles (for "Go" button) */
.btn-primary {
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
    color: var(--text-dark);
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s, box-shadow 0.2s, opacity 0.2s;
    border: none;
    box-shadow: 0 2px 12px rgba(255, 215, 0, 0.18);
    font-size: 1rem;
    cursor: pointer;
    width: 100%;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(90deg, var(--color-primary-hover) 0%, var(--color-primary) 100%);
    box-shadow: 0 4px 24px rgba(255, 215, 0, 0.28);
}

.btn-primary:disabled {
    background: #2a2a2a;
    color: var(--text-gray);
    cursor: not-allowed;
    box-shadow: none;
    border: 1px solid var(--border-color);
}

/* Disclaimer container */
.disclaimer-container {
    margin-top: 1.5rem;
}

/* Disclaimer inside the filter card */
.disclaimer-container .disclaimer-short,
.disclaimer-container .disclaimer-link {
    font-size: 0.8rem;
    color: var(--text-gray);
    line-height: 1.5;
    margin: 0; /* Reset paragraph margins */
    text-align: center;
}

.disclaimer-container .disclaimer-link {
    margin-top: 0rem; /* Small space between text and link */
}

.country-selector .disclaimer-short a {
    color: var(--text-gray-light);
    text-decoration: underline;
    transition: color 0.2s;
}

.country-selector .disclaimer-short a:hover {
    color: var(--color-primary);
}

/* Add margin-top to the validate button to increase the gap */
#validate-button {
    margin-top: 0.5rem;
}

/* Popup Balloon for error messages */
.popup-balloon {
    position: absolute;
    top: 65px; /* Position it just below the input field */
    left: 50%;
    transform: translateX(-50%);    
    background-color: var(--color-primary); /* Use theme color for background */
    color: var(--text-dark); /* Use dark text for contrast */
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 10;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

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

.contact-container {
    background-color: var(--bg-dark-soft);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-top: 1rem;
}

.contact-container p {
    font-size: 0.9rem;
    color: var(--text-gray);
    text-align: center;
    margin: 0; /* Reset paragraph margin */
}

.contact-container a {
    color: var(--text-gray-light);
    text-decoration: underline;
}

/* Utility class to hide elements */
.hidden {
    display: none !important;
}

/* Responsive styles for smaller screens */
@media (max-width: 768px) {
    .container {
        padding: 32px 5vw;
        align-items: flex-start; /* Align card to the top on mobile */
    }

    .filter-section {
        padding: 2rem;
    }

    .filter-section h1 {
        font-size: 1.8rem;
    }

    .filter-section p,
    .filter-section .subtitle {
        font-size: 1rem;
    }
}

/* Footer additions */
footer .footer-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

footer .disclaimer-short {
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-bottom: 16px;
    line-height: 1.5;
}

footer .disclaimer-short a {
    color: var(--text-gray-light);
    text-decoration: underline;
}

footer .disclaimer-short a:hover {
    color: var(--color-primary);
}

/* Make footer stick to the bottom */
footer {
    width: 100%;
    background: var(--bg-dark); /* Match the main site footer background */
    z-index: 999;
    border-top: 1px solid var(--border-color); /* Add border for consistency */
}
