/* DRM Layer 4 — Magnet opt-in widget styles.
   3 layout variants share the same base; modifier classes adjust width,
   padding, and direction. */

.magnet-optin {
    background: #f7f4ec;
    border: 1px solid rgb(0 0 0 / 0.06);
    border-radius: 12px;
    padding: 1.5rem 1.25rem;
    box-shadow: 0 4px 12px rgb(0 0 0 / 0.04);
}

.magnet-optin__head {
    margin-bottom: 1rem;
}

.magnet-optin__headline {
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    line-height: 1.25;
    margin: 0 0 0.5rem;
    color: var(--gray-900, #1a1a1a);
}

.magnet-optin__subhead {
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--gray-700, #4a4a4a);
    margin: 0;
}

.magnet-optin__form {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.magnet-optin__form input[type="text"],
.magnet-optin__form input[type="email"] {
    width: 100%;
    padding: 0.7rem 0.9rem;
    font-size: 0.95rem;
    border: 1px solid rgb(0 0 0 / 0.15);
    border-radius: 8px;
    background: #ffffff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.magnet-optin__form input:focus {
    outline: none;
    border-color: var(--primary, #c89060);
    box-shadow: 0 0 0 3px rgb(200 144 96 / 0.2);
}

.magnet-optin__row {
    display: grid;
    grid-template-columns: 1fr 0.6fr 0.8fr;
    gap: 0.5rem;
}

.magnet-optin__submit {
    margin-top: 0.5rem;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: var(--color-white);
    background: var(--gray-900, #1a1a1a);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}

.magnet-optin__submit:hover { background: #2c2c2c; }
.magnet-optin__submit:active { transform: translateY(1px); }

.magnet-optin__submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.magnet-optin__trust {
    margin: 0.85rem 0 0;
    text-align: center;
    font-size: 0.78rem;
    color: var(--gray-600, #6a6a6a);
}

.magnet-optin__success {
    text-align: center;
    padding: 1rem 0;
}

.magnet-optin__success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: 0.6rem;
    border-radius: 50%;
    /* stylelint-disable-next-line scale-unlimited/declaration-strict-value -- TODO add success-bg/-text semantic tokens */
    background: #d1f1d8;
    /* stylelint-disable-next-line scale-unlimited/declaration-strict-value -- TODO add success-bg/-text semantic tokens */
    color: #15803d;
    font-size: 1.4rem;
    font-weight: 700;
}

.magnet-optin__success-msg {
    margin: 0;
    font-size: 0.95rem;
    color: var(--gray-800, #2a2a2a);
}

/* === Layout variants === */

.magnet-optin--sidebar {
    max-width: 320px;
}

.magnet-optin--footer {
    max-width: 480px;
    margin: 2rem auto;
}

.magnet-optin--inline {
    max-width: 560px;
    margin: 2rem auto;
}

@media (max-width: 540px) {
    .magnet-optin {
        padding: 1.25rem 1rem;
    }

    .magnet-optin__row {
        grid-template-columns: 1fr;
    }

    .magnet-optin__headline {
        font-size: 1.2rem;
    }
}
