/* ================================
   MODAL OVERLAY & FORM STYLES
   ================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 27, 42, 0.95);
    backdrop-filter: blur(10px);
    display: none; /* Changed from flex */
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    display: flex; /* Show when active */
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #ffffff;
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 40px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(50px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 2rem;
    color: var(--text-muted);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--primary);
    transform: rotate(90deg);
}

.modal-content h3 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 10px;
    line-height: 1.2;
}

.modal-content > p {
    color: var(--text-muted);
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Form Styles */
.checklist-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.95rem;
}

.form-control,
.form-select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
    background: #ffffff;
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.form-control::placeholder {
    color: #999;
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.btn-submit-checklist {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: var(--primary);
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn-submit-checklist:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.4);
}

.btn-submit-checklist:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Success Message */
.success-message {
    text-align: center;
    padding: 40px 20px;
}

.success-message h4 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: #28a745;
    margin-bottom: 15px;
}

.success-message p {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .modal-content {
        padding: 30px 20px;
        max-width: 95%;
    }

    .modal-content h3 {
        font-size: 1.6rem;
    }

    .modal-close {
        top: 15px;
        right: 15px;
        font-size: 1.5rem;
        width: 35px;
        height: 35px;
    }

    .form-control,
    .form-select {
        padding: 12px 14px;
        font-size: 0.95rem;
    }

    .btn-submit-checklist {
        padding: 14px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .modal-content {
        padding: 25px 15px;
    }

    .modal-content h3 {
        font-size: 1.4rem;
    }

    .modal-content > p {
        font-size: 0.9rem;
    }
}
