/* TNC FlipBook — Lightweight frontend styles for link/image-link blocks */

.tncfb-embed-with-fs > .tncfb-flipbook-link {
    display: inline-block;
    margin: 0 0 8px;
}
.tncfb-embed-with-fs.tncfb-embed-fs-below > .tncfb-flipbook-link {
    margin: 8px 0 0;
}
.tncfb-embed-with-fs.tncfb-embed-fs-align-left   { text-align: left; }
.tncfb-embed-with-fs.tncfb-embed-fs-align-center { text-align: center; }
.tncfb-embed-with-fs.tncfb-embed-fs-align-right  { text-align: right; }
.tncfb-embed-with-fs > .tnc-flipbook-wrap { text-align: initial; }


.tncfb-flipbook-link {
    cursor: pointer;
}
.tncfb-flipbook-button {
    display: inline-block;
    background: #4a9eff;
    color: #fff;
    padding: 10px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
}
.tncfb-flipbook-button:hover,
.tncfb-flipbook-button:focus {
    background: #3a8eef;
    color: #fff;
    text-decoration: none;
}
.tncfb-flipbook-image-link {
    display: inline-block;
    cursor: pointer;
    line-height: 0;
}
.tncfb-flipbook-image-link img {
    transition: opacity 0.2s;
}
.tncfb-flipbook-image-link:hover img {
    opacity: 0.85;
}

/* ── Cover Placeholder (no image available) ────────────────────────────── */

.tncfb-cover-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 280px;
    min-height: 360px;
    padding: 32px 24px;
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    text-decoration: none;
    line-height: 1.4;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    box-sizing: border-box;
}
.tncfb-cover-placeholder:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
    text-decoration: none;
}
.tncfb-cover-placeholder-icon {
    color: rgba(255, 255, 255, 0.6);
    line-height: 0;
}
.tncfb-cover-placeholder-title {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
}
.tncfb-cover-placeholder-cta {
    color: #4a9eff;
    font-size: 13px;
    font-weight: 500;
    margin-top: 4px;
}
.tncfb-cover-placeholder:hover .tncfb-cover-placeholder-cta {
    text-decoration: underline;
}

/* ── Lightbox / Popup Overlay ──────────────────────────────────────────── */

.tncfb-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
}
.tncfb-popup-overlay.tncfb-popup-active {
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.tncfb-popup-overlay.tncfb-popup-active.tncfb-popup-light {
    background: rgba(255, 255, 255, 0.85) !important;
}
.tncfb-popup-overlay.tncfb-popup-closing {
    background: rgba(0, 0, 0, 0);
}

.tncfb-popup-inner {
    position: relative;
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: scale(0.92) translateY(20px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}
.tncfb-popup-active .tncfb-popup-inner {
    opacity: 1;
    transform: scale(1) translateY(0);
}
.tncfb-popup-closing .tncfb-popup-inner {
    opacity: 0;
    transform: scale(0.92) translateY(20px);
}

.tncfb-popup-close {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 10;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    backdrop-filter: blur(8px);
}
.tncfb-popup-close svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}
.tncfb-popup-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}
.tncfb-popup-light .tncfb-popup-close {
    background: rgba(0, 0, 0, 0.08);
    color: #333;
    border-color: rgba(0, 0, 0, 0.15);
}
.tncfb-popup-light .tncfb-popup-close:hover {
    background: rgba(0, 0, 0, 0.15);
}
.tncfb-popup-light .tncfb-popup-inner {
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
}
.tncfb-popup-close:focus-visible {
    outline: 2px solid #4a9eff;
    outline-offset: 2px;
}

.tncfb-popup-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Scroll lock applied to body when lightbox is open */
body.tncfb-scroll-locked {
    overflow: hidden;
}
