/**
 * Bull Mail Alerts - Front-end styles
 *
 * @author    Bullmade
 * @copyright Bullmade
 * @license   AFL-3.0
 */

.bm-stockmail-wrapper {
    margin: 0.75rem 0 0;
    padding: 0;
}

.bm-stockmail-container {
    background: #f5f9f7;
    border: 1px solid #dce8e1;
    border-radius: 10px;
    padding: 1rem;
}

.bm-stockmail-title {
    font-weight: 600;
    margin: 0 0 0.7rem;
    font-size: 0.9375rem;
    line-height: 1.3;
    color: #232323;
}

.bm-stockmail-form {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.5rem;
}

.bm-stockmail-email-group {
    flex: 1 1 210px;
    min-width: 0;
    margin: 0;
}

.bm-stockmail-email-group input {
    width: 100%;
    max-width: none;
    height: 44px;
    padding: 0 0.875rem;
    border: 1px solid #cfdad4;
    border-radius: 7px;
    background: #fff;
    color: #232323;
    font-size: 0.875rem;
    box-shadow: none;
}

.bm-stockmail-email-group input:focus {
    border-color: #228c60;
    outline: 2px solid rgba(34, 140, 96, 0.16);
    outline-offset: 1px;
    box-shadow: none;
}

.bm-stockmail-gdpr {
    order: 2;
    flex: 0 0 100%;
    margin: 0.125rem 0 0;
}

.bm-stockmail-gdpr-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #666;
    cursor: pointer;
    font-weight: normal;
}

.bm-stockmail-gdpr-label input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
}

.bm-stockmail-btn {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0.625rem 1rem;
    border-radius: 7px;
    white-space: nowrap;
    font-size: 0.875rem;
    font-weight: 600;
}

body#product .bm-stockmail-container .bm-stockmail-btn.btn {
    background: var(--bmts-atc-bg, #228c60) !important;
    border-color: var(--bmts-atc-bg, #228c60) !important;
    color: #fff !important;
}

body#product .bm-stockmail-container .bm-stockmail-btn.btn:hover {
    filter: brightness(0.9);
}

.bm-stockmail-subscribed-msg {
    color: #1c7551;
    font-weight: 500;
    margin: 0 0 0.5rem;
    font-size: 0.875rem;
    line-height: 1.4;
}

.bm-stockmail-icon-check {
    font-weight: bold;
    margin-right: 0.25rem;
}

.bm-stockmail-btn-unsub {
    font-size: 0.85rem;
}

.bm-stockmail-messages {
    margin-top: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

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

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

@media (max-width: 480px) {
    .bm-stockmail-container {
        padding: 0.875rem;
    }

    .bm-stockmail-form {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .bm-stockmail-email-group,
    .bm-stockmail-btn {
        width: 100%;
    }
}
