/* Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 2200; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.6); /* Black w/ opacity */
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

/* Modal Content/Box */
.modal-content {
    background-color: var(--color-bg);
    color: var(--color-text);
    margin: 10% auto; /* 10% from the top and centered */
    padding: 0;
    border: 1px solid var(--color-border);
    width: 90%;
    max-width: 500px;
    border-radius: var(--radius-lg);
    position: relative;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    animation: modalFadeIn 0.3s forwards;
}

@keyframes modalFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* The Close Button */
.close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: var(--color-text-muted);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
}

.close:hover,
.close:focus {
    color: var(--color-primary);
    text-decoration: none;
}

/* Modal Header */
.modal-header {
    padding: 25px 30px 15px;
    text-align: center;
    position: relative;
}

.modal-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: inline-block;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: float 3s ease-in-out infinite;
}

.modal-header .section-title {
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.modal-header .waitlist-subtitle {
    font-size: 1rem;
    color: var(--color-text-muted);
    margin-bottom: 0;
}

/* Modal Body */
.modal-body {
    padding: 20px 30px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--color-text);
}

.waitlist-form input[type="email"],
.waitlist-form select,
.waitlist-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    background-color: var(--color-bg-alt);
    color: var(--color-text);
    transition: var(--transition);
}

.waitlist-form input[type="email"]:focus,
.waitlist-form select:focus,
.waitlist-form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(0, 197, 142, 0.2);
}

.waitlist-form select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 15px;
    padding-right: 40px;
}

.waitlist-form textarea {
    resize: vertical;
    min-height: 100px;
}

.waitlist-form button[type="submit"] {
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    margin-top: 10px;
}

.waitlist-form button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* Modal Footer */
.modal-footer {
    padding: 15px 30px 25px;
    text-align: center;
    border-top: 1px solid var(--color-border);
    background-color: var(--color-bg-alt);
}

.modal-footer p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* Dark Mode Adjustments */
.dark-mode .modal-content {
    background-color: var(--color-bg-dark);
    border-color: var(--color-border-dark);
}

.dark-mode .waitlist-form input,
.dark-mode .waitlist-form select,
.dark-mode .waitlist-form textarea {
    background-color: var(--color-bg-alt-dark);
    border-color: var(--color-border-dark);
    color: var(--color-text-dark);
}

/* Responsive Adjustments */
@media (max-width: 576px) {
    .modal-content {
        width: 95%;
        margin: 15% auto;
    }
    
    .modal-header {
        padding: 20px 20px 10px;
    }
    
    .modal-body {
        padding: 15px 20px;
    }
    
    .modal-footer {
        padding: 15px 20px 20px;
    }
    
    .modal-icon {
        font-size: 2rem;
    }
    
    .modal-header .section-title {
        font-size: 1.5rem;
    }
}
