/**
 * ACS Content Gate — Frontend styles.
 *
 * Inherits as much as possible from the active theme.
 * All classes are prefixed with .acs-gate to avoid collisions.
 * Override any of these in your theme stylesheet.
 */

/* ===== Blur + Overlay Gate ===== */
.acs-gate-blur {
    position: relative;
    min-height: 520px;
}

.acs-gate-blur__content {
    filter: blur(6px);
    -webkit-filter: blur(6px);
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    /* Fade out at the bottom */
    -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
}

.acs-gate-blur__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    padding: 2rem 1rem;
    z-index: 2;
}

.acs-gate-blur__overlay.is-sticky {
    position: fixed;
    top: calc(var(--header-height, 64px) + 2rem);
    left: 0;
    right: 0;
}

/* Gate card without the blurred placeholder: same centring the overlay
   provided, without position:absolute or the blur shell's min-height. */
.acs-gate-bare {
    display: flex;
    justify-content: center;
    padding: 2rem 1rem;
}

/* ===== Gate Card (floats over blurred content) ===== */
.acs-gate {
    margin: 0;
    padding: 0;
    clear: both;
    width: 100%;
    max-width: 640px;
}

.acs-gate__inner {
    background: #ffffff;
    color: #1a1a2e;
    border-radius: 12px;
    padding: 2em;
    text-align: center;
    border: 1px solid #e5e7eb;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
}

.acs-gate__message {
    font-size: 1.05em;
    margin-bottom: 1.5em;
    color: #374151;
    line-height: 1.5;
}

.acs-gate__greeting {
    font-size: 0.875em;
    margin-bottom: 1em;
    color: #6b7280;
}

.acs-gate__logout-link {
    text-decoration: underline;
    color: #6b7280;
}

.acs-gate__logout-link:hover {
    color: #374151;
}

/* Buttons */
.acs-gate__button {
    display: inline-block;
    padding: 0.75em 2em;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

.acs-gate__button:hover,
.acs-gate__button:focus {
    transform: translateY(-1px);
}

.acs-gate__button--login,
.acs-gate__button--subscribe {
    background: #2563eb;
    color: #ffffff;
}

.acs-gate__button--login:hover,
.acs-gate__button--subscribe:hover {
    background: #1d4ed8;
}

.acs-gate__button--subscribe {
    margin-top: 0.5em;
}

/* ===== Subtitle ===== */
.acs-gate__subtitle {
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
    margin: 0 0 1em;
}

/* ===== Product Cards ===== */
.acs-gate__products {
    display: flex;
    flex-direction: row;
    gap: 0.75em;
}

.acs-gate__product {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 1.5em 1.25em;
    text-align: left;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.acs-gate__product:hover {
    border-color: #2563eb;
    box-shadow: 0 0 0 1px #2563eb;
}

.acs-gate__product-name {
    font-size: 0.95em;
    font-weight: 700;
    margin: 0 0 0.75em;
    color: #1a1a2e;
}

.acs-gate__product-features {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.8em;
    color: #6b7280;
    flex: 1;
}

.acs-gate__product-features li {
    display: flex;
    align-items: baseline;
    gap: 0.4em;
    padding: 0.2em 0;
}

.acs-gate__product-features li::before {
    content: '\2713';
    color: #10b981;
    font-weight: 700;
    font-size: 0.85em;
    flex-shrink: 0;
}

.acs-gate__product-price {
    font-size: 1.25em;
    font-weight: 700;
    color: #1a1a2e;
    margin: 1em 0 0.75em;
    line-height: 1;
}

.acs-gate__product-price-period {
    font-size: 0.55em;
    font-weight: 400;
    color: #6b7280;
}

.acs-gate__button--full {
    display: block;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
    padding: 0.625em 1em;
    font-size: 0.9em;
    margin-top: 0;
}

.acs-gate__login-link {
    font-size: 0.85em;
    color: #9ca3af;
    margin-top: 1.25em;
    margin-bottom: 0;
}

.acs-gate__login-link a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.acs-gate__login-link a:hover {
    text-decoration: underline;
    color: #1d4ed8;
}

@media (max-width: 520px) {
    .acs-gate__products {
        flex-direction: column;
    }
}

/* ===== Header User Menu ===== */
.acs-gate-user {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.acs-gate-user__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

.acs-gate-user__name {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.acs-gate-user__chevron {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.acs-gate-user__toggle[aria-expanded="true"] .acs-gate-user__chevron {
    transform: rotate(180deg);
}

.acs-gate-user__dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 220px;
    background: #ffffff;
    color: #1a1a2e;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
    z-index: 101;
    overflow: hidden;
}

.acs-gate-user__dropdown.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.acs-gate-user__header {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    border-bottom: 1px solid #e5e7eb;
}

.acs-gate-user__item {
    display: block;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #374151;
    text-decoration: none;
    transition: background 0.15s ease;
}

.acs-gate-user__item:hover,
.acs-gate-user__item:focus {
    background: #f3f4f6;
    color: #111827;
}

.acs-gate-user__item--logout {
    border-top: 1px solid #e5e7eb;
}
