/* Bedots Popup Form Styles */

/* Overlay */
.bedots-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

/* Popup Container */
.bedots-popup-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: popupSlideIn 0.3s ease-out;
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Popup Header */
.bedots-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px 15px;
    border-bottom: 1px solid #e5e5e5;
}

.bedots-popup-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.bedots-popup-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.bedots-popup-close:hover {
    background-color: #f5f5f5;
    color: #666;
}

/* Form */
.bedots-popup-form {
    padding: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.form-group input:invalid {
    border-color: #dc3232;
}

/* Submit Button */
.bedots-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bedots-submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #005a87 0%, #004a6f 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.bedots-submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

.bedots-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Form Messages */
.bedots-form-message {
    padding: 12px 15px;
    border-radius: 6px;
    margin-top: 15px;
    font-size: 14px;
    font-weight: 500;
}

.bedots-form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.bedots-form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Body class when popup is open */
body.bedots-popup-open {
    overflow: hidden;
}

/* Responsive Design */
@media (max-width: 480px) {
    .bedots-popup-container {
        margin: 10px;
        max-width: calc(100% - 20px);
    }
    
    .bedots-popup-header {
        padding: 15px 20px 10px;
    }
    
    .bedots-popup-header h3 {
        font-size: 18px;
    }
    
    .bedots-popup-form {
        padding: 20px;
    }
    
    .form-group input {
        padding: 10px 12px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .bedots-submit-btn {
        padding: 12px 16px;
        font-size: 15px;
    }
}

/* Accessibility */
.bedots-popup-overlay:focus {
    outline: none;
}

.bedots-popup-container:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .bedots-popup-overlay {
        background-color: rgba(0, 0, 0, 0.9);
    }
    
    .bedots-popup-container {
        border: 2px solid #000;
    }
    
    .form-group input {
        border-width: 2px;
    }
}
