/* ========================================
   Modal Popup Styles - Elan The Statement
   ======================================== */

/* Modal (used by floorplan-download.js) */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal .modal-content {
    background: linear-gradient(145deg, #1a1a1a 0%, #0d0d0d 100%);
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(218, 188, 116, 0.3);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5),
                0 0 60px -15px rgba(218, 188, 116, 0.2);
    padding: 30px;
}

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

.modal .modal-header {
    text-align: center;
    padding: 0 0 20px;
    border-bottom: 1px solid rgba(218, 188, 116, 0.2);
    margin-bottom: 20px;
}

.modal .modal-header h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    color: #fff;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #DABC74 0%, #98723B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal .modal-header p {
    color: #999;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

.modal .form-group {
    margin-bottom: 18px;
}

.modal .form-group label {
    display: block;
    font-size: 0.85rem;
    color: #ccc;
    margin-bottom: 6px;
    font-weight: 500;
}

.modal .form-group label i {
    margin-right: 6px;
    color: #DABC74;
}

.modal .form-group input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #fff;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.modal .form-group input:focus {
    outline: none;
    border-color: #DABC74;
    background: rgba(218, 188, 116, 0.05);
    box-shadow: 0 0 0 3px rgba(218, 188, 116, 0.1);
}

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

.modal .btn-block {
    width: 100%;
    padding: 14px 28px;
    font-size: 1rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #DABC74 0%, #98723B 100%);
    border: none;
    color: #000;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal .btn-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(218, 188, 116, 0.3);
}

.modal .btn-block:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Container */
.modal-container {
    background: linear-gradient(145deg, #1a1a1a 0%, #0d0d0d 100%);
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(218, 188, 116, 0.3);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5),
                0 0 60px -15px rgba(218, 188, 116, 0.2);
}

.modal-overlay.active .modal-container {
    transform: scale(1) translateY(0);
}

/* Modal Close Button */
.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.modal-close:hover {
    background: rgba(218, 188, 116, 0.3);
    transform: rotate(90deg);
}

/* Modal Header */
.modal-header {
    text-align: center;
    padding: 30px 30px 20px;
    border-bottom: 1px solid rgba(218, 188, 116, 0.2);
}

.modal-logo {
    max-width: 180px;
    height: auto;
    margin-bottom: 15px;
}

.modal-header h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    color: #fff;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #DABC74 0%, #98723B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-header p {
    color: #999;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Modal Form */
.modal-form {
    padding: 25px 30px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.modal-form .form-group {
    margin-bottom: 18px;
}

.modal-form label {
    display: block;
    font-size: 0.85rem;
    color: #ccc;
    margin-bottom: 6px;
    font-weight: 500;
}

.modal-form label i {
    margin-right: 6px;
    color: #DABC74;
}

.modal-form input,
.modal-form select {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #fff;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.modal-form input:focus,
.modal-form select:focus {
    outline: none;
    border-color: #DABC74;
    background: rgba(218, 188, 116, 0.05);
    box-shadow: 0 0 0 3px rgba(218, 188, 116, 0.1);
}

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

.modal-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='%23DABC74' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
}

.modal-form select option {
    background: #1a1a1a;
    color: #fff;
}

/* Checkbox styling */
.modal-form .checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.modal-form .checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: #DABC74;
    cursor: pointer;
}

.modal-form .checkbox label {
    margin-bottom: 0;
    font-size: 0.8rem;
    color: #999;
    cursor: pointer;
}

/* Submit Button */
.modal-form .btn {
    margin-top: 10px;
    padding: 14px 28px;
    font-size: 1rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.modal-form .btn i {
    font-size: 0.9rem;
}

/* Privacy Note */
.modal-privacy {
    text-align: center;
    font-size: 0.75rem;
    color: #666;
    margin-top: 15px;
}

.modal-privacy i {
    margin-right: 5px;
    color: #28a745;
}

/* Modal Footer */
.modal-footer {
    text-align: center;
    padding: 20px 30px 25px;
    border-top: 1px solid rgba(218, 188, 116, 0.2);
    background: rgba(0, 0, 0, 0.3);
    border-radius: 0 0 20px 20px;
}

.modal-footer p {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 8px;
}

.modal-phone {
    font-size: 1.25rem;
    font-weight: 600;
    color: #DABC74;
    transition: all 0.3s ease;
}

.modal-phone:hover {
    color: #fff;
}

.modal-phone i {
    margin-right: 8px;
    animation: phone-ring 1s ease infinite;
}

@keyframes phone-ring {
    0%, 100% { transform: rotate(0); }
    10% { transform: rotate(-15deg); }
    20% { transform: rotate(15deg); }
    30% { transform: rotate(-15deg); }
    40% { transform: rotate(15deg); }
    50% { transform: rotate(0); }
}

/* Success State */
.modal-form.success {
    text-align: center;
    padding: 40px 30px;
}

.modal-form.success .success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 36px;
    color: #fff;
}

.modal-form.success h4 {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 10px;
}

.modal-form.success p {
    color: #999;
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 576px) {
    .modal-container {
        max-width: 100%;
        margin: 10px;
        border-radius: 15px;
    }

    .modal-header {
        padding: 25px 20px 15px;
    }

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

    .modal-form {
        padding: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .modal-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
    }

    .modal-footer {
        padding: 15px 20px 20px;
    }
}
