/**
 * Blendo Mailer - Subscription Forms Styles
 */

/* Base Form Styles */
.bm-subscription-form {
    max-width: 500px;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.bm-form-title {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 600;
    color: #1e1e1e;
}

.bm-form-description {
    margin: 0 0 20px 0;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.bm-form-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bm-form-row {
    display: flex;
    gap: 12px;
}

.bm-form-row-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.bm-form-field {
    display: flex;
    flex-direction: column;
}

.bm-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.bm-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.bm-input::placeholder {
    color: #999;
}

.bm-submit-button {
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background-color: #0073aa;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.bm-submit-button:hover {
    background-color: #005a87;
}

.bm-submit-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.bm-form-privacy {
    text-align: center;
    margin-top: 8px;
}

.bm-form-privacy small {
    font-size: 12px;
    color: #888;
}

/* Form Messages */
.bm-form-messages {
    margin-bottom: 15px;
}

.bm-message {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.5;
}

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

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

.bm-message-loading {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Style Variants */

/* Minimal Style */
.bm-style-minimal .bm-form-title {
    font-size: 20px;
    font-weight: 500;
}

.bm-style-minimal .bm-input {
    border: none;
    border-bottom: 2px solid #ddd;
    border-radius: 0;
    padding: 10px 5px;
}

.bm-style-minimal .bm-input:focus {
    border-bottom-color: #0073aa;
    box-shadow: none;
}

.bm-style-minimal .bm-submit-button {
    border-radius: 0;
}

/* Boxed Style */
.bm-style-boxed {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.bm-style-boxed .bm-form-title {
    text-align: center;
}

.bm-style-boxed .bm-form-description {
    text-align: center;
}

/* Widget Styles */
.widget .bm-subscription-form {
    max-width: 100%;
}

.widget .bm-form-title {
    font-size: 18px;
    margin-bottom: 15px;
}

.widget .bm-input {
    padding: 10px 12px;
    font-size: 14px;
}

.widget .bm-submit-button {
    padding: 12px 20px;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 600px) {
    .bm-form-row-split {
        grid-template-columns: 1fr;
    }

    .bm-subscription-form {
        max-width: 100%;
    }

    .bm-form-title {
        font-size: 20px;
    }

    .bm-input {
        padding: 10px 14px;
        font-size: 14px;
    }

    .bm-submit-button {
        padding: 12px 20px;
        font-size: 15px;
    }

    .bm-style-boxed {
        padding: 20px;
    }
}

/* Loading State */
.bm-form-loading .bm-submit-button::after {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 8px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: bm-spinner 0.6s linear infinite;
}

@keyframes bm-spinner {
    to {
        transform: rotate(360deg);
    }
}
