/**
 * Frontend styles for Notify Back in Stock
 */

/* Main notification form container */
.wanb-notification-form {
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Form title */
.wanb-form-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

/* Form description */
.wanb-form-description {
    margin: 0 0 16px 0;
    font-size: 14px;
    color: #000000;
    line-height: 1.4;
}

/* Form row layout - stacked vertically */
.wanb-form-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
}

/* Email input */
.wanb-email-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
    background: white;
}

.wanb-email-input:focus {
    outline: none;
    border-color: #000000;
}

.wanb-email-input::placeholder {
    color: #999;
}

.wanb-email-input:invalid {
    /* border-color: #dc3545; */
}

/* Submit button */
.wanb-submit-btn {
    background: #000000;
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    width: 100%;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    position: relative;
}

.wanb-submit-btn:hover {
    background: #333333;
}

.wanb-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Button loading state */
.wanb-btn-loading {
    display: none;
    align-items: center;
    gap: 8px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
}

.wanb-submit-btn .wanb-btn-text {
    transition: opacity 0.2s ease;
}

.wanb-submit-btn.loading .wanb-btn-text {
    opacity: 0;
}

.wanb-submit-btn.loading .wanb-btn-loading {
    display: flex !important;
}

/* Spinner */
.wanb-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.2);
    border-top: 3px solid #000000;
    border-radius: 50%;
    animation: wanb-spin 1s linear infinite;
    flex-shrink: 0;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
}

@keyframes wanb-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Messages container */
.wanb-messages {
    margin-top: 12px;
}

/* Success message */
.wanb-success-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 10px;
    font-size: 14px;
}

/* Error message */
.wanb-error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 10px;
    font-size: 14px;
}

/* Privacy notice */
.wanb-privacy-notice {
    margin-top: 12px;
    line-height: 0.9;
}

.wanb-privacy-notice small {
    color: #888;
    font-size: 12px;
}

/* Responsive design for mobile */
@media (max-width: 480px) {
    .wanb-notification-form {
        margin: 15px 0;
    }
    
    .wanb-form-title {
        font-size: 15px;
    }
    
    .wanb-email-input,
    .wanb-submit-btn {
        font-size: 16px;
        padding: 12px 14px;
    }
}

/* Dark theme support */
/* @media (prefers-color-scheme: dark) {
    .wanb-form-title {
        color: #fff;
    }
    
    .wanb-form-description {
        color: #000000;
    }
    
    .wanb-email-input {
        background: #333;
        border-color: #555;
        color: #fff;
    }
    
    .wanb-email-input::placeholder {
        color: #aaa;
    }
    
    .wanb-email-input:focus {
        border-color: #0073aa;
    }
    
    .wanb-privacy-notice small {
        color: #aaa;
    }
} */

/* Accessibility improvements */
.wanb-submit-btn:focus-visible {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.wanb-email-input:focus-visible {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}
