/* TLC Newsletter public-facing styles. Scoped with .tlc-nl- prefix and
   high enough specificity to survive most theme styles. */

.tlc-nl-form-wrap {
        max-width: 520px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        margin: 0 0 1.5em;
        font-family: inherit;
}
.tlc-nl-form-wrap .tlc-nl-form-title {
        margin: 0 0 .75em;
        font-size: 1.25em;
        line-height: 1.3;
}
.tlc-nl-form-wrap .tlc-nl-field {
        margin-bottom: 1em;
}
.tlc-nl-form-wrap .tlc-nl-field > label {
        display: block;
        font-weight: 600;
        margin-bottom: .35em;
        font-size: .95em;
}
.tlc-nl-form-wrap .tlc-nl-required { color: #c0392b; }
.tlc-nl-form-wrap input[type="text"].tlc-nl-input,
.tlc-nl-form-wrap .tlc-nl-field input[type="text"],
.tlc-nl-form-wrap .tlc-nl-field input[type="email"] {
        width: 100%;
        padding: 12px 14px;
        border: 1px solid #cbd5e1;
        border-radius: 6px;
        font-size: 1em;
        line-height: 1.4;
        box-sizing: border-box;
        background: #fff;
        color: #1f2d3d;
}
.tlc-nl-form-wrap .tlc-nl-field input[type="text"]:focus,
.tlc-nl-form-wrap .tlc-nl-field input[type="email"]:focus {
        outline: none;
        border-color: #17a2b8;
        box-shadow: 0 0 0 3px rgba(23,162,184,.15);
}

.tlc-nl-form-wrap .tlc-nl-consent label {
        display: flex;
        align-items: flex-start;
        gap: 10px;
        font-weight: 400;
        font-size: .85em;
        line-height: 1.5;
        color: #475569;
        cursor: pointer;
}
.tlc-nl-form-wrap .tlc-nl-consent input[type="checkbox"] {
        margin-top: 3px;
        flex: 0 0 auto;
}

/* Honeypot: visually hidden but present for bots. */
.tlc-nl-form-wrap .tlc-nl-hp {
        position: absolute !important;
        left: -9999px !important;
        top: auto !important;
        width: 1px !important;
        height: 1px !important;
        overflow: hidden !important;
}

.tlc-nl-form-wrap .tlc-nl-actions { margin-top: .5em; }
.tlc-nl-form-wrap button.tlc-nl-button {
        display: inline-block;
        background: var(--tlc-btn-bg, #17a2b8) !important;
        color: var(--tlc-btn-text, #fff) !important;
        border: none;
        padding: 12px 26px;
        border-radius: 6px;
        font-size: 1em;
        font-weight: 600;
        cursor: pointer;
        line-height: 1.4;
        transition: filter .15s ease, background .15s ease;
}
.tlc-nl-form-wrap button.tlc-nl-button:hover { filter: brightness(0.92); }
.tlc-nl-form-wrap button.tlc-nl-button:disabled { opacity: .6; cursor: default; }

/* Inline sign-up form layout: First Name, Last Name, Email in one row on desktop. */
.tlc-nl-form-inline {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
}
.tlc-nl-form-inline .tlc-nl-inline-fields {
        display: flex !important;
        flex-direction: row !important;
        gap: 16px !important;
        align-items: flex-start !important;
        margin-bottom: 1em !important;
}
.tlc-nl-form-inline .tlc-nl-inline-fields .tlc-nl-field {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        margin-bottom: 0 !important;
}
.tlc-nl-form-inline .tlc-nl-inline-fields .tlc-nl-field input {
        width: 100% !important;
        box-sizing: border-box !important;
}
@media (max-width: 767px) {
        .tlc-nl-form-inline .tlc-nl-inline-fields {
                flex-direction: column !important;
                gap: 0 !important;
                margin-bottom: 0 !important;
        }
        .tlc-nl-form-inline .tlc-nl-inline-fields .tlc-nl-field {
                margin-bottom: 1em !important;
        }
}

/* Wide (two-column) sign-up form layout (R6). */
.tlc-nl-form-wide {
        max-width: 900px !important;
}
.tlc-nl-form-wide .tlc-nl-form-cols {
        display: flex !important;
        gap: 32px !important;
        align-items: flex-start !important;
}
.tlc-nl-form-wide .tlc-nl-form-col-fields,
.tlc-nl-form-wide .tlc-nl-form-col-gdpr {
        flex: 1 1 0 !important;
        min-width: 0;
}
@media (max-width: 1024px) {
        .tlc-nl-form-wide .tlc-nl-form-cols {
                flex-direction: column !important;
                gap: 20px !important;
        }
}

.tlc-nl-form-wrap .tlc-nl-message {
        margin-top: 1em;
        font-size: .95em;
        line-height: 1.5;
}
.tlc-nl-form-wrap .tlc-nl-message.is-success { color: #166534; }
.tlc-nl-form-wrap .tlc-nl-message.is-error { color: #b91c1c; }

/* Unsubscribe + notices */
.tlc-nl-unsub-wrap { max-width: 520px; }
.tlc-nl-unsub-wrap .tlc-nl-button {
        display: inline-block;
        background: #17a2b8;
        color: #fff;
        border: none;
        padding: 12px 26px;
        border-radius: 6px;
        font-size: 1em;
        font-weight: 600;
        cursor: pointer;
}
.tlc-nl-unsub-wrap .tlc-nl-button:hover { background: #128295; }

.tlc-nl-notice {
        padding: 14px 18px;
        border-radius: 8px;
        font-size: 1em;
        line-height: 1.5;
        border-left: 4px solid;
        margin: 0 0 1em;
}
.tlc-nl-notice-success { background: #f0fdf4; border-color: #16a34a; color: #166534; }
.tlc-nl-notice-error { background: #fef2f2; border-color: #dc2626; color: #991b1b; }
.tlc-nl-notice-info { background: #eff6ff; border-color: #3b82f6; color: #1e40af; }


/* Topics (mailing lists) selection on the sign-up form. */
.tlc-nl-form-wrap .tlc-nl-topics {
        margin-bottom: 1em;
}
.tlc-nl-form-wrap .tlc-nl-all-note {
        margin: 0 0 1em;
        font-size: .95em;
        color: #0b2545;
        font-style: italic;
}
.tlc-nl-form-wrap .tlc-nl-topics-label {
        display: block;
        font-weight: 600;
        margin: 0 0 .5em;
        font-size: .9em;
}
.tlc-nl-form-wrap .tlc-nl-topic-all,
.tlc-nl-form-wrap .tlc-nl-topic-item {
        display: flex;
        align-items: center;
        gap: .5em;
        cursor: pointer;
        font-size: .9em;
        margin-bottom: .35em;
}
.tlc-nl-form-wrap .tlc-nl-topic-all {
        font-weight: 600;
        margin-bottom: .75em;
        padding-bottom: .6em;
        border-bottom: 1px solid #d9dee3;
}
.tlc-nl-form-wrap .tlc-nl-topic-all input[type="checkbox"],
.tlc-nl-form-wrap .tlc-nl-topic-item input[type="checkbox"] {
        margin: 0;
        flex: 0 0 auto;
}
.tlc-nl-form-wrap .tlc-nl-topic-list {
        padding-left: .25em;
}



/* Manage subscriptions + improved unsubscribe pages.
   Card layout shared by both pages, with brand colours that override
   most theme styles via !important where needed. */
.tlc-nl-card {
        max-width: 560px !important;
        margin: 1.5em auto !important;
        background: #ffffff !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 10px !important;
        box-shadow: 0 6px 20px rgba(11, 37, 69, 0.08) !important;
        padding: 32px 34px !important;
        box-sizing: border-box !important;
        text-align: left !important;
}
.tlc-nl-card .tlc-nl-card-title {
        margin: 0 0 .6em !important;
        color: #0b2545 !important;
        font-size: 1.5em !important;
        line-height: 1.25 !important;
}
.tlc-nl-card p { line-height: 1.6; }
.tlc-nl-card .tlc-nl-manage-intro { margin-bottom: 1.25em; }

/* Name fields on the manage form. */
.tlc-nl-manage-wrap .tlc-nl-field { margin-bottom: 1em; }
.tlc-nl-manage-wrap .tlc-nl-field label {
        display: block;
        font-weight: 600;
        margin: 0 0 .35em;
        font-size: .95em;
}
.tlc-nl-manage-wrap .tlc-nl-field input[type="text"] {
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 10px 12px !important;
        border: 1px solid #cbd5e1 !important;
        border-radius: 6px !important;
        font-size: 1em !important;
}

/* Interest Group checkboxes, consistent with the sign-up form. */
.tlc-nl-manage-wrap .tlc-nl-topics { margin: 1em 0 1.25em; }
.tlc-nl-manage-wrap .tlc-nl-topics-label {
        display: block;
        font-weight: 600;
        margin: 0 0 .5em;
        font-size: .95em;
}
.tlc-nl-manage-wrap .tlc-nl-topic-item {
        display: flex;
        align-items: center;
        gap: .5em;
        cursor: pointer;
        font-size: .95em;
        margin-bottom: .4em;
}
.tlc-nl-manage-wrap .tlc-nl-topic-item input[type="checkbox"] {
        margin: 0;
        flex: 0 0 auto;
}

/* Primary (teal) button on the manage page. */
.tlc-nl-manage-wrap .tlc-nl-button {
        display: inline-block !important;
        background: #17a2b8 !important;
        color: #ffffff !important;
        border: none !important;
        padding: 12px 26px !important;
        border-radius: 6px !important;
        font-size: 1em !important;
        font-weight: 600 !important;
        cursor: pointer !important;
}
.tlc-nl-manage-wrap .tlc-nl-button:hover { background: #128295 !important; }

/* Navy "Yes, unsubscribe me" button: clear but less alarming than red. */
.tlc-nl-button-navy {
        background: #0b2545 !important;
        color: #ffffff !important;
        border-color: #0b2545 !important;
}
.tlc-nl-button-navy:hover { background: #123a6b !important; }

/* Separator before the unsubscribe-all option. */
.tlc-nl-manage-sep {
        border: none;
        border-top: 1px solid #e2e8f0;
        margin: 1.75em 0 1.25em;
}

/* Unsubscribe-from-all link: kept clearly visible to meet UK GDPR,
   which requires an obvious way to withdraw consent. */
.tlc-nl-unsub-all {
        font-size: .95em !important;
        color: #4a5568 !important;
        line-height: 1.6 !important;
}
.tlc-nl-unsub-all-link,
.tlc-nl-unsub-all-link:link,
.tlc-nl-unsub-all-link:visited {
        color: #17a2b8 !important;
        text-decoration: underline !important;
        font-weight: 600 !important;
}
.tlc-nl-unsub-all-link:hover,
.tlc-nl-unsub-all-link:focus {
        color: #0b2545 !important;
        text-decoration: underline !important;
}

/* "Manage my preferences instead" link on the unsubscribe page: muted. */
.tlc-nl-manage-instead {
        margin-top: 1em !important;
        font-size: .9em !important;
}
.tlc-nl-manage-instead a,
.tlc-nl-manage-instead a:link,
.tlc-nl-manage-instead a:visited {
        color: #6b7280 !important;
        text-decoration: none !important;
}
.tlc-nl-manage-instead a:hover,
.tlc-nl-manage-instead a:focus {
        color: #0b2545 !important;
        text-decoration: underline !important;
}

/* Sign-up-again link after unsubscribing. */
.tlc-nl-signup-again { margin-top: 1em !important; }
.tlc-nl-signup-again a { color: #17a2b8 !important; text-decoration: underline !important; }
.tlc-nl-signup-again a:hover { color: #0b2545 !important; }

/* Current groups list on the unsubscribe confirmation page. */
.tlc-nl-unsub-wrap .tlc-nl-unsub-groups {
        margin: .5em 0 1.25em;
        padding-left: 1.25em;
}
.tlc-nl-unsub-wrap .tlc-nl-unsub-groups li { margin-bottom: .3em; }
