/**
 * Content Lead Gate — frontend styles.
 *
 * Ported from the standalone content-lead-gate plugin. The clg-* selectors are
 * a compatibility contract with theme overrides. Changes from the original:
 * the Google Fonts @import is gone (fonts inherit from the theme), the badge
 * is a real .clg-gate__badge element instead of ::before content, and the
 * brand colors are CSS custom properties so they can be themed per site.
 * The !importants on .clg-gate--active are deliberate — they defeat theme
 * card/box styles wherever the shortcode lands.
 */
.clg-gate {
    --clg-primary:    #023a67;
    --clg-accent:     #259494;
    --clg-highlight:  #e9aa22;
    --clg-text:       #4a4a4a;
    --clg-headline:   var(--clg-primary);
    --clg-badge-text: var(--clg-primary);
}
.clg-gated-content {
    position: relative;
    margin-top: -2rem;
}
.clg-gated-content--blurred .clg-gated-content__inner {
    filter: blur(var(--clg-blur, 6px));
    pointer-events: none;
    user-select: none;
    transition: filter 0.4s;
    mask-image: linear-gradient(black 30%, transparent 95%);
    -webkit-mask-image: linear-gradient(black 30%, transparent 95%);
    max-height: 600px;
    overflow: hidden;
    padding-top: 4rem;
}
.clg-gate { display: none; }
.clg-gate--active {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    max-width: 720px !important;
    margin: 3.5rem auto 0 !important;
    z-index: 10 !important;
    background: transparent !important;
    animation: clg-pulse 2.8s ease-in-out infinite;
}
@keyframes clg-pulse {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-4px); }
}
.clg-gate--active .clg-gate__inner {
    position: relative !important;
    background: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: 0 25px 70px rgba(2, 58, 103, 0.28), 0 0 0 1px rgba(2, 58, 103, 0.05) !important;
    padding: 5rem 4rem 4rem !important;
    text-align: center !important;
    box-sizing: border-box !important;
    border-top: 6px solid var(--clg-accent) !important;
    font-family: inherit;
    overflow: visible !important;
}
.clg-gate__badge {
    display: inline-block;
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--clg-highlight);
    color: var(--clg-badge-text);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 0.55rem 1.25rem;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(233, 170, 34, 0.35);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--clg-highlight) 35%, transparent);
    white-space: nowrap;
}
.clg-gate__headline {
    font-family: inherit;
    font-size: 2.25rem;
    font-weight: 800;
    margin: 0 0 1rem;
    color: var(--clg-headline);
    line-height: 1.15;
    letter-spacing: -0.015em;
}
.clg-gate__subtext {
    font-size: 1.05rem;
    color: var(--clg-text);
    margin: 0 auto 2.25rem;
    line-height: 1.55;
    max-width: 100%;
}
.clg-gate__form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    align-items: center;
}
.clg-gate__input {
    width: 100%;
    max-width: 460px;
    padding: 1.1rem 1.25rem;
    font-size: 1.05rem;
    font-family: inherit;
    color: var(--clg-text);
    border: 1.5px solid #d9dfe5;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    background: #ffffff;
}
.clg-gate__input:focus {
    border-color: var(--clg-accent);
    box-shadow: 0 0 0 3px rgba(37, 148, 148, 0.2);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--clg-accent) 20%, transparent);
}
.clg-gate__optin {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    max-width: 460px;
    width: 100%;
    text-align: left;
    font-size: 0.88rem;
    color: var(--clg-text);
    line-height: 1.5;
    margin-top: 0.5rem;
}
.clg-gate__optin input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    accent-color: var(--clg-accent);
    flex-shrink: 0;
    cursor: pointer;
}
.clg-gate__optin label { cursor: pointer; }
.clg-gate__btn {
    width: 100%;
    max-width: 460px;
    padding: 1.25rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ffffff;
    background: var(--clg-accent);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
    font-family: inherit;
    box-shadow: 0 8px 22px rgba(37, 148, 148, 0.4);
    box-shadow: 0 8px 22px color-mix(in srgb, var(--clg-accent) 40%, transparent);
    margin-top: 1rem;
}
.clg-gate__btn:hover {
    background: #1e7a7a;
    background: color-mix(in srgb, var(--clg-accent) 82%, #000);
    box-shadow: 0 10px 28px rgba(37, 148, 148, 0.5);
    box-shadow: 0 10px 28px color-mix(in srgb, var(--clg-accent) 50%, transparent);
    transform: translateY(-1px);
}
.clg-gate__btn:active { transform: scale(0.98); }
.clg-gate__btn:disabled { opacity: 0.6; cursor: not-allowed; box-shadow: none; transform: none; }
.clg-gate__message {
    margin-top: 1.25rem;
    font-size: 0.95rem;
    min-height: 1.2em;
    color: var(--clg-primary);
}
.clg-gate__message--success { color: var(--clg-accent); }
@media (max-width: 700px) {
    .clg-gate--active .clg-gate__inner {
        padding: 3.5rem 1.75rem 2.5rem !important;
    }
    .clg-gate__headline { font-size: 1.6rem; }
    .clg-gate__subtext { font-size: 0.98rem; }
    .clg-gate__btn { font-size: 1rem; padding: 1.1rem 1.25rem; }
}
