/**
 * Public styles for Monthly Newsletter
 */

/* Form container */
.monthly-newsletter-form {
    max-width: 100%;
    margin: 20px 0;
}

/* Horizontal layout */
.monthly-newsletter-form.horizontal {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
}

.monthly-newsletter-form.horizontal .monthly-newsletter-field {
    flex: 1;
    min-width: 200px;
    margin-right: 10px;
    margin-bottom: 10px;
}

.monthly-newsletter-form.horizontal .monthly-newsletter-button {
    margin-bottom: 10px;
}

/* Vertical layout */
.monthly-newsletter-form.vertical .monthly-newsletter-field {
    margin-bottom: 15px;
}

/* Form elements */
.monthly-newsletter-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.monthly-newsletter-field input[type="text"],
.monthly-newsletter-field input[type="email"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    line-height: 1.5;
}

.monthly-newsletter-button button {
    display: inline-block;
    padding: 8px 16px;
    background-color: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    line-height: 1.5;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
}

.monthly-newsletter-button button:hover {
    background-color: #005d8c;
}

/* Messages */
.monthly-newsletter-message {
    padding: 10px 15px;
    margin: 15px 0;
    border-radius: 4px;
    display: none;
}

.monthly-newsletter-message.success {
    background-color: #e7f7e9;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.monthly-newsletter-message.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.monthly-newsletter-message.visible {
    display: block;
}

/* Loading indicator */
.monthly-newsletter-loading {
    display: none;
    margin-left: 10px;
    vertical-align: middle;
}

.monthly-newsletter-loading.visible {
    display: inline-block;
}

.monthly-newsletter-loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 115, 170, 0.2);
    border-radius: 50%;
    border-top-color: #0073aa;
    animation: monthly-newsletter-spin 1s infinite linear;
}

@keyframes monthly-newsletter-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Responsive adjustments */
@media screen and (max-width: 600px) {
    .monthly-newsletter-form.horizontal {
        flex-direction: column;
    }
    
    .monthly-newsletter-form.horizontal .monthly-newsletter-field {
        width: 100%;
        margin-right: 0;
    }
    
    .monthly-newsletter-form.horizontal .monthly-newsletter-button {
        margin-top: 10px;
    }
}

/* Confirmation and unsubscribe messages */
.mn-confirmation-message,
.mn-unsubscribe-message {
    max-width: 600px;
    margin: 40px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.mn-confirmation-message h2,
.mn-unsubscribe-message h2 {
    color: #0073aa;
    margin-top: 0;
}

.mn-confirmation-message p,
.mn-unsubscribe-message p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.mn-confirmation-message a,
.mn-unsubscribe-message a {
    display: inline-block;
    padding: 10px 20px;
    background-color: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
}

.mn-confirmation-message a:hover,
.mn-unsubscribe-message a:hover {
    background-color: #005d8c;
}
