.lead-form-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.lead-form-container {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 550px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lead-form-overlay.active .lead-form-container {
    transform: scale(1);
}

.lead-form-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 24px 28px;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lead-form-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.lead-form-close {
    background: none;
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.lead-form-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.lead-form-body {
    padding: 28px;
}

.apartment-summary {
    background: #e8f4f8;
    border-left: 4px solid #3498db;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.apartment-summary h3 {
    margin: 0 0 12px 0;
    font-size: 18px;
    color: #2c3e50;
}

.apartment-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    font-size: 14px;
    color: #555;
}

.apartment-info-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.apartment-info-item strong {
    color: #2c3e50;
}

.form-section {
    margin-bottom: 24px;
}

.form-section h3 {
    font-size: 16px;
    color: #2c3e50;
    margin: 0 0 16px 0;
    font-weight: 600;
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #2c3e50;
}

.form-group label .required {
    color: #e74c3c;
    margin-left: 2px;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: white;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

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

.form-input.error,
.form-textarea.error,
.form-select.error {
    border-color: #e74c3c;
}

.form-error {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 4px;
    display: none;
}

.form-error.visible {
    display: block;
}

.contact-methods {
    display: flex;
    gap: 12px;
}

.contact-method-option {
    flex: 1;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.contact-method-option:hover {
    border-color: #3498db;
    background: #f0f8ff;
}

.contact-method-option.selected {
    border-color: #3498db;
    background: #3498db;
    color: white;
}

.contact-method-option input[type="radio"] {
    display: none;
}

.form-footer {
    display: flex;
    gap: 12px;
    margin-top: 28px;
}

.btn-submit,
.btn-cancel {
    flex: 1;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-submit {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(52, 152, 219, 0.4);
}

.btn-submit:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-cancel {
    background: white;
    color: #555;
    border: 2px solid #ddd;
}

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

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.success-message,
.error-message {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
}

.success-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.error-message {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.success-message.visible,
.error-message.visible {
    display: block;
}

.interest-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white !important;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
    margin-top: 16px;
    text-decoration: none !important;
}

.interest-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(39, 174, 96, 0.4);
    color: white !important;
    text-decoration: none !important;
}

.interest-button:visited {
    color: white !important;
    text-decoration: none !important;
}

.interest-button svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.success-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.success-modal-container {
    background: linear-gradient(135deg, #ffffff 0%, #f0fff4 100%);
    border-radius: 20px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.3);
    max-width: 480px;
    width: 90%;
    padding: 40px;
    text-align: center;
    transform: scale(0.8) translateY(-20px);
    transition: transform 0.3s ease;
}

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

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: success-pop 0.5s ease 0.2s both;
}

.success-icon svg {
    width: 48px;
    height: 48px;
    fill: white;
    animation: checkmark-draw 0.5s ease 0.4s both;
}

@keyframes success-pop {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes checkmark-draw {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.success-modal-title {
    font-size: 28px;
    font-weight: 700;
    color: #27ae60;
    margin: 0 0 16px 0;
}

.success-modal-message {
    font-size: 16px;
    color: #555;
    line-height: 1.6;
    margin: 0 0 32px 0;
}

.success-modal-button {
    width: 100%;
    padding: 16px 32px;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 6px 16px rgba(39, 174, 96, 0.3);
}

.success-modal-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(39, 174, 96, 0.4);
}

.success-modal-button:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .lead-form-container {
        max-width: 95%;
        max-height: 95vh;
    }

    .lead-form-header {
        padding: 20px 20px;
    }

    .lead-form-header h2 {
        font-size: 20px;
    }

    .lead-form-body {
        padding: 20px;
    }

    .apartment-info {
        grid-template-columns: 1fr;
    }

    .contact-methods {
        flex-direction: column;
    }

    .form-footer {
        flex-direction: column-reverse;
    }

    .success-modal-container {
        padding: 32px 24px;
    }

    .success-icon {
        width: 70px;
        height: 70px;
    }

    .success-icon svg {
        width: 42px;
        height: 42px;
    }

    .success-modal-title {
        font-size: 24px;
    }

    .success-modal-message {
        font-size: 15px;
    }
}
