/**
 * Woominder Modal Styles
 */

/* Modal Backdrop */
.woominder-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
}

/* Modal Container */
.woominder-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modal Content */
.woominder-modal-content {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    max-height: 90vh;
    width: 90%;
    overflow: hidden;
    position: relative;
    z-index: 10002;
}

/* Modal Header */
.woominder-modal-header {
    padding: 20px 20px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.woominder-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.woominder-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 0;
    line-height: 1;
}

.woominder-modal-close:hover {
    color: #666;
}

/* Modal Body */
.woominder-modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

/* Modal Footer */
.woominder-modal-footer {
    padding: 0 20px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.woominder-view-product {
    text-decoration: none;
}

/* Loading State */
.woominder-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Form Styles in Modal */
.woominder-modal .woominder-stock-notification-form {
    margin: 0;
}

.woominder-modal .woominder-form-row {
    margin-bottom: 15px;
}

.woominder-modal .woominder-email-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.woominder-modal .woominder-email-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.woominder-modal .woominder-form-row-consent {
    margin-bottom: 20px;
}

.woominder-modal .woominder-consent-label {
    font-size: 14px;
    line-height: 1.4;
}

.woominder-modal .woominder-submit-btn {
    width: 100%;
    padding: 12px 20px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.woominder-modal .woominder-submit-btn:hover {
    background: #005a87;
}

.woominder-modal .woominder-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Already Subscribed Message */
.woominder-modal .woominder-already-subscribed {
    text-align: center;
    padding: 20px;
}

.woominder-modal .woominder-already-subscribed p {
    margin: 0;
    color: #666;
}

/* Success/Error Messages */
.woominder-modal .woominder-message {
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
    font-size: 14px;
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .woominder-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .woominder-modal-header,
    .woominder-modal-body,
    .woominder-modal-footer {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .woominder-modal-header {
        padding-top: 15px;
    }
    
    .woominder-modal-footer {
        padding-bottom: 15px;
    }
}

/* Animation */
@keyframes woominder-fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.woominder-modal.show .woominder-modal-content {
    animation: woominder-fadeIn 0.3s ease-out;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .woominder-modal-content {
        border: 2px solid #000;
    }
    
    .woominder-modal-close {
        color: #000;
    }
    
    .woominder-email-input {
        border: 2px solid #000;
    }
}

/* Subscribed Button State */
.woominder-subscribed-btn {
    background: #28a745 !important;
    color: #fff !important;
    border-color: #28a745 !important;
    cursor: default !important;
    opacity: 0.9;
}

.woominder-subscribed-btn:hover {
    background: #28a745 !important;
    border-color: #28a745 !important;
    opacity: 0.9 !important;
}

/* Button State Transitions */
.woominder-notify-btn,
.woominder-subscribed-btn {
    transition: all 0.3s ease;
}