/* Waitlist Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease-out;
}

.modal-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #f1f1f1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.modal-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-icon {
    width: auto;
    height: 24px;
    /* background: #fef2f2; */
    /* border-radius: 8px; */
    /* display: flex; */
    /* align-items: center; */
    /* justify-content: center; */
    /* flex-shrink: 0; */
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-red);
    margin: 0;
    line-height: 1.2;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.modal-close:hover {
    background: #f5f5f5;
    color: #333;
}

.modal-body {
    padding: 24px;
}

.modal-description {
    font-size: 14px;
    color: #666;
    margin: 0 0 24px 0;
    line-height: 1.5;
}

.waitlist-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.form-label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin: 0;
}

.input-wrapper p {
    width: 100%;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 12px;
    color: #999;
    z-index: 1;
    top: 14px;
}

.modal .form-input {
    width: 100%;
    padding: 12px 12px 12px 44px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    background: white;
    transition: all 0.2s ease;
    outline: none;
}

.modal .form-input:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.modal .form-input::placeholder {
    color: #999;
}

.checkbox-group {
    margin: 8px 0;
}

.checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    line-height: 1.4;
}

.checkbox-input {
    display: none;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid #e1e5e9;
    border-radius: 4px;
    background: white;
    flex-shrink: 0;
    position: relative;
    transition: all 0.2s ease;
    margin-top: 1px;
}

.checkbox-input:checked+.checkbox-custom {
    background: #ef4444;
    border-color: #ef4444;
}

.checkbox-input:checked+.checkbox-custom::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 5px;
    border: 2px solid white;
    border-top: none;
    border-right: none;
    transform: translate(-50%, -60%) rotate(-45deg);
}

.checkbox-text {
    font-size: 13px;
    color: #666;
    flex: 1;
}

.modal-actions p {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.btn-cancel {
    flex: 1;
    padding: 12px 24px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    background: white;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel:hover {
    background: #f8f9fa;
    border-color: #d1d5db;
}

.btn-submit {
    flex: 1;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    background: #ef4444;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-submit:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Loading state */
.waitlist-form.loading .btn-submit {
    background: #ccc;
    cursor: not-allowed;
}

/* Success/Error Messages */
.success-message {
    background: #f0f9ff;
    border: 1px solid #38bdf8;
    color: #0369a1;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 16px;
}

.error-message {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 16px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* Mobile Responsive */
@media (max-width: 480px) {
    .modal-content {
        width: 95%;
        margin: 20px;
        max-height: calc(100vh - 40px);
    }

    .modal-header {
        padding: 20px 20px 16px;
    }

    .modal-body {
        padding: 20px;
    }

    .modal-title {
        font-size: 18px;
    }

    .modal-actions {
        flex-direction: column;
    }

    .btn-cancel,
    .btn-submit {
        width: 100%;
    }
}

/* Contact Form 7 Integration Styles */
.modal-body .wpcf7 {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 0;
}

.modal-body .wpcf7-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 0;
}

.modal-body .wpcf7-form>p {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modal-body .wpcf7-form-control-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    flex-direction: column;
    align-items: self-start;
}

.modal-body .wpcf7-form-control {
    /* width: 100%; */
    /* padding: 12px 12px 12px 44px; */
    /* border: 1px solid #e1e5e9; */
    /* border-radius: 8px; */
    /* font-size: 14px; */
    /* color: #333; */
    /* background: white; */
    /* transition: all 0.2s ease; */
    /* outline: none; */
    /* box-sizing: border-box; */
}

.modal-body .wpcf7-form-control:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

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

/* Email input specific styling */
.modal-body .wpcf7-email {
    width: 100%;
    padding: 12px 12px 12px 44px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    background: white;
    transition: all 0.2s ease;
    outline: none;
}

.modal-body .wpcf7-email:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Add email icon to CF7 email input */
.modal-body .wpcf7-form-control-wrap:has(.wpcf7-email)::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 4H20C21.1 4 22 4.9 22 6V18C22 19.1 21.1 20 20 20H4C2.9 20 2 19.1 2 18V6C2 4.9 2.9 4 4 4Z' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpolyline points='22,6 12,13 2,6' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    z-index: 1;
    display: none;
}

/* Checkbox styling for CF7 */
.modal-body .wpcf7-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0;
}

.modal-body .wpcf7-list-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0;
}

.modal-body .wpcf7-list-item-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    line-height: 22px;
    font-size: 15px;
    color: #666;
}

.modal-body .wpcf7-checkbox input[type="checkbox"] {
    display: none;
}

.modal-body .wpcf7-checkbox input[type="checkbox"]+span {
    position: relative;
    padding-left: 30px;
}

.modal-body .wpcf7-checkbox input[type="checkbox"]+span::before {
    content: '';
    position: absolute;
    left: 0;
    top: 1px;
    width: 18px;
    height: 18px;
    border: 2px solid #e1e5e9;
    border-radius: 4px;
    background: white;
    transition: all 0.2s ease;
}

.modal-body .wpcf7-checkbox input[type="checkbox"]:checked+span::before {
    background: #ef4444;
    border-color: #ef4444;
}

.modal-body .wpcf7-checkbox input[type="checkbox"]:checked+span::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 7px;
    width: 8px;
    height: 5px;
    border: 2px solid white;
    border-top: none;
    border-right: none;
    transform: rotate(-45deg);
}

/* Submit button styling */
.modal-body .wpcf7-submit {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    background: #ef4444;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    margin-top: 8px;
}

.modal-body .wpcf7-submit:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.modal-body .wpcf7-submit:active {
    transform: translateY(0);
}

.modal-body .wpcf7-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Response messages */
.modal-body .wpcf7-response-output {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    border: none;
}

.modal-body .wpcf7-validation-errors {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #dc2626;
}

.modal-body .wpcf7-mail-sent-ok {
    background: #f0f9ff;
    border: 1px solid #38bdf8;
    color: #0369a1;
}

.modal-body .wpcf7-mail-sent-ng {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #dc2626;
}

/* Hide CF7 spinner */
.modal-body .wpcf7-spinner {
    display: none;
}

/* Label styling */
.modal-body .wpcf7 label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
    display: block;
    margin: 0;
}

/* Add the Cancel button separately if needed */
.modal-body::after {
    content: '';
    display: block;
    margin-top: 12px;
}

/* Custom button container for Cancel + Submit */
.modal-body .cf7-wrapper {
    position: relative;
}

.modal-body .button-container {
    display: flex;
    gap: 12px;
    margin-top: -8px;
    position: relative;
}

.modal-body .btn-cancel {
    flex: 1;
    padding: 12px 24px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    background: white;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-body .btn-cancel:hover {
    background: #f8f9fa;
    border-color: #d1d5db;
}

/* Make submit button flex to match cancel */
.modal-body .wpcf7-submit {
    flex: 1;
    margin-top: 0;
}

/* Adjust form layout to work with button container */
.modal-body .wpcf7-form {
    position: relative;
}

.modal-body .wpcf7-form .wpcf7-submit {
    /* position: absolute; */
    right: 0;
    bottom: -60px;
    /* width: calc(50% - 6px); */
    margin: 0;
}

.wpcf7 form .wpcf7-response-output {
    margin: 0;
}