/* Signalfire Email Newsletter Frontend Styles */

.sen-form-container {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sen-form {
    margin: 0;
}

.sen-form-fields {
    margin-bottom: 20px;
}

.sen-field-group {
    margin-bottom: 15px;
}

.sen-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.sen-required {
    color: #d63638;
}

.sen-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    box-sizing: border-box;
}

.sen-input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

/* Remove default invalid styling from browsers */
.sen-input:invalid {
    border-color: #ccc;
    box-shadow: none;
}

/* Only show invalid styling when explicitly marked as error */
.sen-input.sen-error {
    border-color: #d63638;
}

/* Show invalid styling after user interaction */
.sen-input:not(:focus):invalid.sen-touched {
    border-color: #d63638;
}

.sen-form-actions {
    margin-bottom: 15px;
}

.sen-submit-btn {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sen-btn-subscribe {
    background-color: #007cba;
    color: #ffffff;
}

.sen-btn-subscribe:hover:not(:disabled) {
    background-color: #005a87;
}

.sen-btn-unsubscribe {
    background-color: #d63638;
    color: #ffffff;
}

.sen-btn-unsubscribe:hover:not(:disabled) {
    background-color: #b32d2e;
}

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

.sen-form-messages {
    margin-top: 15px;
}

.sen-success-message {
    padding: 10px 12px;
    background-color: #d1e7dd;
    border: 1px solid #badbcc;
    border-radius: 4px;
    color: #0f5132;
    font-size: 14px;
    margin-bottom: 10px;
}

.sen-error-message {
    padding: 10px 12px;
    background-color: #f8d7da;
    border: 1px solid #f5c2c7;
    border-radius: 4px;
    color: #842029;
    font-size: 14px;
    margin-bottom: 10px;
}

.sen-loading-message {
    padding: 10px 12px;
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    border-radius: 4px;
    color: #0c5460;
    font-size: 14px;
    margin-bottom: 10px;
    text-align: center;
}

.sen-form-error {
    padding: 15px;
    background-color: #f8d7da;
    border: 1px solid #f5c2c7;
    border-radius: 4px;
    color: #842029;
    font-size: 14px;
    text-align: center;
}

/* Responsive design */
@media (max-width: 480px) {
    .sen-form-container {
        margin: 0 10px;
        padding: 15px;
    }

    .sen-input {
        padding: 8px 10px;
        font-size: 16px; /* Prevent zoom on iOS */
    }

    .sen-submit-btn {
        padding: 10px 16px;
        font-size: 14px;
    }
}

/* Override-friendly utility classes */
.sen-form-compact .sen-form-container {
    padding: 15px;
    max-width: 300px;
}

.sen-form-wide .sen-form-container {
    max-width: 500px;
}

.sen-form-minimal {
    border: none;
    box-shadow: none;
    background: transparent;
}

.sen-form-minimal .sen-form-container {
    border: none;
    box-shadow: none;
    background: transparent;
    padding: 0;
}