/* ===========================
   IRON AMINOS NEWSLETTER
   Frontend – My Account Banner
   =========================== */

.ian-newsletter-banner {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.09);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transition: border-color 0.2s ease;
}

.ian-newsletter-banner:hover {
    border-color: rgba(176, 0, 32, 0.2);
}

.ian-banner-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #ffffff 0%, #f7f7f8 100%);
    position: relative;
}

/* Subtle accent line on left */
.ian-banner-inner::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #b00020;
    border-radius: 0 2px 2px 0;
}

.ian-banner-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: rgba(176, 0, 32, 0.06);
    border: 1px solid rgba(176, 0, 32, 0.12);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ian-banner-text {
    flex: 1;
    min-width: 0;
}

.ian-banner-title {
    display: block;
    font-size: 15px;
    font-weight: 800;
    color: #0f0f10;
    letter-spacing: -0.2px;
    margin-bottom: 3px;
}

.ian-banner-desc {
    display: block;
    font-size: 13px;
    font-weight: 400;
    color: #666;
    line-height: 1.4;
}

/* ---- Toggle switch ---- */
.ian-banner-toggle-wrap {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.ian-toggle {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    cursor: pointer;
}

.ian-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.ian-toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #d1d5db;
    border-radius: 28px;
    transition: background 0.25s ease, box-shadow 0.25s ease;
}

.ian-toggle-slider::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    left: 3px;
    bottom: 3px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform 0.25s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.ian-toggle input:checked + .ian-toggle-slider {
    background: #b00020;
    box-shadow: 0 0 0 3px rgba(176, 0, 32, 0.12);
}

.ian-toggle input:checked + .ian-toggle-slider::before {
    transform: translateX(24px);
}

.ian-toggle input:focus-visible + .ian-toggle-slider {
    box-shadow: 0 0 0 3px rgba(176, 0, 32, 0.2);
}

.ian-toggle-status {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    transition: color 0.2s ease;
}

.ian-status--on {
    color: #b00020;
}

.ian-status--off {
    color: #999;
}

/* ---- Feedback toast ---- */
.ian-banner-feedback {
    padding: 10px 24px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    animation: ianFadeIn 0.3s ease;
}

.ian-banner-feedback.ian-feedback--success {
    background: rgba(176, 0, 32, 0.04);
    color: #b00020;
}

.ian-banner-feedback.ian-feedback--error {
    background: rgba(211, 47, 47, 0.06);
    color: #d32f2f;
}

@keyframes ianFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---- Mobile responsive ---- */
@media (max-width: 600px) {
    .ian-banner-inner {
        flex-wrap: wrap;
        padding: 16px 18px;
        gap: 12px;
    }

    .ian-banner-icon {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }

    .ian-banner-icon svg {
        width: 22px;
        height: 22px;
    }

    .ian-banner-text {
        flex: 1 1 calc(100% - 68px);
    }

    .ian-banner-title {
        font-size: 14px;
    }

    .ian-banner-desc {
        font-size: 12px;
    }

    .ian-banner-toggle-wrap {
        flex-direction: row;
        width: 100%;
        justify-content: space-between;
        align-items: center;
        padding-top: 10px;
        border-top: 1px solid rgba(0, 0, 0, 0.06);
    }

    .ian-toggle-status {
        order: -1;
    }
}
