/* THF Slow Feed */

.thf-slowfeed-bar,
.thf-slowfeed-modal,
.thf-slowfeed-bar *,
.thf-slowfeed-modal * { box-sizing: border-box; }

.thf-slowfeed-bar {
    position: fixed;
    left: 22px;
    right: 22px;
    bottom: 18px;
    z-index: 99980;
    opacity: 0;
    transform: translateY(24px);
    pointer-events: none;
    transition: opacity .28s ease, transform .28s ease;
    font-family: inherit;
}

.thf-slowfeed-bar.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.thf-slowfeed-bar-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    align-items: center;
    max-width: 1180px;
    margin: 0 auto;
    padding: 13px 16px 13px 20px;
    background: #061936;
    color: #fff;
    border-radius: 18px;
    box-shadow: 0 18px 60px rgba(0,0,0,.22);
}

.thf-slowfeed-bar-copy {
    display: flex;
    gap: 14px;
    align-items: center;
    min-width: 0;
}

.thf-slowfeed-label {
    display: inline-flex;
    align-items: center;
    letter-spacing: .16em;
    text-transform: uppercase;
    font-size: 11px;
    line-height: 1;
    color: rgba(255,255,255,.68);
    white-space: nowrap;
}

.thf-slowfeed-text {
    font-size: 15px;
    line-height: 1.35;
    color: rgba(255,255,255,.95);
}

.thf-slowfeed-bar-actions {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.thf-slowfeed-open,
.thf-slowfeed-submit {
    appearance: none;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: #fff;
    color: #071a34;
    padding: 11px 18px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: .03em;
    transition: transform .22s ease, opacity .22s ease;
}

.thf-slowfeed-open:hover,
.thf-slowfeed-submit:hover {
    transform: translateY(-1px);
    opacity: .92;
}

.thf-slowfeed-close,
.thf-slowfeed-modal-close {
    appearance: none;
    border: 0;
    cursor: pointer;
    background: transparent;
    color: #fff;
    width: 34px;
    height: 34px;
    font-size: 25px;
    line-height: 1;
    border-radius: 50%;
    opacity: .82;
}

.thf-slowfeed-close:hover,
.thf-slowfeed-modal-close:hover { opacity: 1; }

.thf-slowfeed-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99990;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.thf-slowfeed-modal.is-open { display: flex; }

.thf-slowfeed-overlay {
    position: absolute;
    inset: 0;
    background: rgba(4,13,28,.58);
    backdrop-filter: blur(4px);
}

.thf-slowfeed-panel {
    position: relative;
    z-index: 2;
    width: min(560px, 100%);
    max-height: min(760px, calc(100vh - 48px));
    overflow-y: auto;
    margin: 0;
    padding: 34px;
    background: #fff;
    color: #071a34;
    border-radius: 26px;
    box-shadow: 0 28px 90px rgba(0,0,0,.32);
    -webkit-overflow-scrolling: touch;
}

.thf-slowfeed-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    color: #071a34;
    background: #f1f3f5;
}

.thf-slowfeed-panel .thf-slowfeed-label {
    color: #697586;
    margin-bottom: 14px;
}

.thf-slowfeed-panel h2 {
    margin: 0 0 12px;
    font-size: clamp(30px, 4.4vw, 46px);
    line-height: 1.02;
    font-weight: 500;
    color: #071a34 !important;
}

.thf-slowfeed-intro {
    margin: 0 0 20px;
    max-width: 500px;
    font-size: 16px;
    line-height: 1.55;
    color: #435165;
}

.thf-slowfeed-form p { margin: 0 0 13px; }

.thf-slowfeed-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.thf-slowfeed-form label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 600;
    color: #071a34;
}

.thf-slowfeed-form input[type='text'],
.thf-slowfeed-form input[type='email'] {
    width: 100%;
    border: 1px solid #d7dde5;
    background: #f7f9fb;
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 15px;
    color: #071a34;
}

.thf-slowfeed-checkbox label {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.45;
    color: #435165;
}

.thf-slowfeed-checkbox input { margin-top: 3px; }
.thf-slowfeed-checkbox a { color: #071a34; text-decoration: underline; }

.thf-slowfeed-submit {
    background: #071a34;
    color: #fff;
    padding: 14px 22px;
}

.thf-slowfeed-alert {
    border-radius: 16px;
    padding: 14px 16px;
    margin-bottom: 18px;
    font-size: 14px;
    line-height: 1.45;
}

.thf-slowfeed-success { background: #eef7ee; color: #1f4f25; }
.thf-slowfeed-error { background: #fff0f0; color: #7a1d1d; }
.thf-slowfeed-error ul { margin: 8px 0 0 18px; }

.thf-slowfeed-honeypot {
    position: absolute;
    left: -9999px;
    height: 0;
    overflow: hidden;
}

body.thf-slowfeed-open { overflow: hidden; }

@media (max-width: 760px) {
    .thf-slowfeed-bar {
        left: 10px;
        right: 10px;
        bottom: 10px;
    }

    .thf-slowfeed-bar-inner {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 14px;
        border-radius: 16px;
    }

    .thf-slowfeed-bar-copy { display: block; }
    .thf-slowfeed-label { margin-bottom: 7px; }
    .thf-slowfeed-text { display: block; font-size: 14px; }
    .thf-slowfeed-bar-actions { justify-content: space-between; }
    .thf-slowfeed-open { flex: 1; }

    .thf-slowfeed-modal {
        align-items: center;
        padding: 12px;
    }

    .thf-slowfeed-panel {
        width: 100%;
        max-height: calc(100vh - 24px);
        margin: 0;
        padding: 26px 20px 22px;
        border-radius: 22px;
    }

    .thf-slowfeed-panel h2 {
        font-size: 31px;
    }

    .thf-slowfeed-intro {
        font-size: 15px;
        line-height: 1.5;
        margin-bottom: 16px;
    }

    .thf-slowfeed-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
}


/* Override tema: evita testo tutto maiuscolo nel popup Slow Feed */
.thf-slowfeed-panel h2,
.thf-slowfeed-intro,
.thf-slowfeed-form label,
.thf-slowfeed-form input,
.thf-slowfeed-checkbox,
.thf-slowfeed-checkbox label,
.thf-slowfeed-checkbox a,
.thf-slowfeed-alert {
    text-transform: none !important;
    letter-spacing: normal !important;
}

.thf-slowfeed-intro {
    font-weight: 400 !important;
}

.thf-slowfeed-panel h2 {
    font-weight: 500 !important;
}
