/* static/css/subscription.css */

.subscription-widget {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    margin: 40px auto;
    text-align: center;
}

.subscription-widget h2 {
    color: #333;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.8em;
}

.subscription-widget p {
    color: #555;
    font-size: 1em;
    margin-bottom: 20px;
    line-height: 1.6;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
}

/* For screen-reader only, visually hidden */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.form-group input[type="email"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 1em;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.form-group input[type="email"]:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: none;
}

.validation-message {
    font-size: 0.875em;
    color: #dc3545; /* Red for errors */
    margin-top: 8px;
    min-height: 1.2em; /* Reserve space to prevent layout shifts */
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
}

.form-actions button {
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, transform 0.1s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px; /* Ensure buttons have a decent minimum width */
}

.form-actions button:hover {
    transform: translateY(-1px);
}

.form-actions button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: translateY(0);
}

.button-primary {
    background-color: #007bff;
    color: white;
}

.button-primary:hover:not(:disabled) {
    background-color: #0056b3;
}

.button-secondary {
    background-color: #6c757d;
    color: white;
}

.button-secondary:hover:not(:disabled) {
    background-color: #545b62;
}

.feedback-message {
    margin-top: 20px;
    padding: 12px;
    border-radius: 6px;
    font-size: 0.95em;
    min-height: 1.5em; /* Reserve space */
}

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

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

.feedback-message.info {
    background-color: #e2e3e5;
    color: #383d41;
    border: 1px solid #d6d8db;
}

/* Spinner styles */
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff; /* For primary button */
    animation: spin 1s ease-infinite;
    margin-left: 8px;
}

.button-secondary .spinner {
    border-top-color: #fff; /* For secondary button, adjust if needed */
}


@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .subscription-widget {
        margin: 20px;
        padding: 20px;
    }

    .subscription-widget h2 {
        font-size: 1.6em;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions button {
        width: 100%; /* Full width buttons on small screens */
    }
} 