/* Visitor Engagement Modal Styles */

.engagement-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    animation: fadeIn 0.3s ease-in;
}

.engagement-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    max-width: 500px;
    width: 90%;
    animation: slideDown 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.engagement-modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 32px;
    position: relative;
}

.engagement-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    color: #666;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

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

.engagement-modal-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.engagement-modal-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

.engagement-modal-body {
    margin-bottom: 0;
}

.engagement-modal-body p {
    color: #666;
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 24px;
}

.engagement-form-group {
    margin-bottom: 20px;
}

.engagement-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.required {
    color: #e74c3c;
}

.engagement-form-control {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.engagement-form-control:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.engagement-form-control:invalid:not(:placeholder-shown) {
    border-color: #e74c3c;
}

.error-message {
    display: block;
    font-size: 13px;
    color: #e74c3c;
    margin-top: 4px;
    min-height: 18px;
}

.engagement-btn-submit {
    width: 100%;
    padding: 12px 16px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.engagement-btn-submit:hover:not(:disabled) {
    background-color: #0056b3;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.engagement-btn-submit:active:not(:disabled) {
    transform: translateY(1px);
}

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

.engagement-modal-success {
    text-align: center;
}

.success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background-color: #d4edda;
    border-radius: 50%;
    font-size: 36px;
    color: #28a745;
    margin-bottom: 16px;
}

.engagement-modal-success h4 {
    font-size: 22px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
}

.engagement-modal-success p {
    color: #666;
    font-size: 15px;
    margin-bottom: 24px;
}

.engagement-btn-close {
    padding: 10px 24px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.engagement-btn-close:hover {
    background-color: #218838;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.engagement-btn-close:active {
    transform: translateY(1px);
}

/* Responsive Design */
@media (max-width: 640px) {
    .engagement-modal {
        width: 95%;
        max-width: calc(100% - 20px);
    }

    .engagement-modal-content {
        padding: 24px;
    }

    .engagement-modal-header h3 {
        font-size: 20px;
    }

    .engagement-modal-body p {
        font-size: 14px;
    }

    .engagement-form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

@media (max-width: 380px) {
    .engagement-modal-content {
        padding: 20px;
    }

    .engagement-modal-close {
        top: 12px;
        right: 12px;
    }

    .engagement-modal-header {
        padding-bottom: 12px;
    }

    .engagement-modal-header h3 {
        font-size: 18px;
    }

    .engagement-form-group {
        margin-bottom: 16px;
    }
}
