/* =============================================================
   Owl Restrict — Gate Overlay Styles
   ============================================================= */

/* Wrapper: clips the blur and positions the overlay card */
.owr-gate-wrapper {
    position: relative;
    margin-top: 24px;
    overflow: hidden;
}

/* Blurred tail: one paragraph shown behind the card */
.owr-content-blur {
    position: relative;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    max-height: 120px;
    overflow: hidden;

    /* Fade out from top to bottom */
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);

    /* Blur the text */
    filter: blur(5px);
}

/* Overlay card: centered over the blurred area */
.owr-overlay-card {
    position: relative;
    z-index: 10;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
    padding: 40px 36px;
    margin: -80px auto 0;
    max-width: 560px;
    text-align: center;
}

/* No blurred tail — card sits flush below the excerpt, no negative pull needed */
.owr-overlay-card.owr-no-blur {
    margin-top: 24px;
}

/* Card heading */
.owr-card-heading {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 12px;
    line-height: 1.3;
}

/* Card body — HTML content from the template */
.owr-card-body {
    font-size: 15px;
    color: #4b5563;
    line-height: 1.7;
    margin: 0 0 24px;
}

.owr-card-body p {
    margin: 0 0 10px;
}

.owr-card-body p:last-child {
    margin-bottom: 0;
}

/* CTA button — inherits theme styles via wp-element-button, with fallback */
.owr-btn-wrap {
    margin-top: 8px;
}

/* Layout and fallback — theme overrides via wp-element-button take priority */
.owr-gate-btn {
    display: inline-block;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: #3b82f6;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.15s, box-shadow 0.15s;
    line-height: 1.4;
}

.owr-gate-btn:hover {
    opacity: 0.9;
    text-decoration: none;
}

.owr-gate-btn:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* =============================================================
   Portal Article — Minimal article styles when in FC portal
   ============================================================= */

.owr-article {
    max-width: 720px;
    margin: 0 auto;
    padding: 32px 24px 48px;
}

.owr-article .entry-title {
    font-size: 28px;
    font-weight: 800;
    color: #111827;
    margin: 0 0 16px;
    line-height: 1.25;
}

.owr-article-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.owr-article-content {
    font-size: 16px;
    line-height: 1.8;
    color: #374151;
}

.owr-article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Fallback layout (when FC portal is not available) */
.owr-article-fallback-wrap {
    min-height: 60vh;
    padding: 40px 16px;
}

.owr-article-fallback-inner {
    max-width: 760px;
    margin: 0 auto;
}

/* =============================================================
   Responsive
   ============================================================= */

@media (max-width: 768px) {
    .owr-overlay-card {
        padding: 32px 24px;
        border-radius: 14px;
    }

    .owr-card-heading {
        font-size: 20px;
    }
}

@media (max-width: 600px) {
    .owr-overlay-card {
        padding: 28px 20px;
        border-radius: 12px;
    }

    .owr-card-heading {
        font-size: 19px;
    }

    .owr-article .entry-title {
        font-size: 22px;
    }
}
