/**
 * Frontend Form CSS for WP Blog Mailer
 * File: assets/css/form.css
 */

.wpbm-form-container {
    max-width: 500px;
    margin: 30px auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.wpbm-form-title {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 700;
    color: #2c3338;
    text-align: center;
}

.wpbm-form-description {
    margin: 0 0 25px;
    color: #646970;
    text-align: center;
    font-size: 15px;
}

.wpbm-subscribe-form {
    width: 100%;
}

.wpbm-form-field {
    margin-bottom: 20px;
}

.wpbm-form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3338;
    font-size: 14px;
}

.wpbm-form-field input[type="text"],
.wpbm-form-field input[type="email"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.wpbm-form-field input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

.wpbm-submit-btn {
    width: 100%;
    padding: 14px 20px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.wpbm-submit-btn:hover {
    background: #135e96;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
}

.wpbm-submit-btn:active {
    transform: translateY(0);
}

.wpbm-form-privacy {
    margin: 15px 0 0;
    font-size: 12px;
    color: #646970;
    text-align: center;
    line-height: 1.5;
}

/* Messages */
.wpbm-message {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.wpbm-message-success {
    background: #d1e7dd;
    color: #0f5132;
    border: 1px solid #badbcc;
}

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

/* Loading State */
.wpbm-subscribe-form.loading .wpbm-submit-btn {
    opacity: 0.6;
    cursor: not-allowed;
    position: relative;
}

.wpbm-subscribe-form.loading .wpbm-submit-btn::after {
    content: '';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: wpbm-spin 0.6s linear infinite;
}

@keyframes wpbm-spin {
    to { transform: translateY(-50%) rotate(360deg); }
}

/* Responsive */
@media (max-width: 600px) {
    .wpbm-form-container {
        margin: 20px 10px;
        padding: 20px;
    }
    
    .wpbm-form-title {
        font-size: 20px;
    }
    
    .wpbm-form-description {
        font-size: 14px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .wpbm-form-container {
        background: #1e1e1e;
        color: #fff;
    }
    
    .wpbm-form-title,
    .wpbm-form-field label {
        color: #fff;
    }
    
    .wpbm-form-description {
        color: #b0b0b0;
    }
    
    .wpbm-form-field input {
        background: #2c2c2c;
        border-color: #404040;
        color: #fff;
    }
    
    .wpbm-form-privacy {
        color: #b0b0b0;
    }
}