/* FlexNovels Premium Chapter Directory 2.2.1 */

.wp-block-query.fncql-premium-directory{
    --fnc-gold:#c99a2e;
    --fnc-gold-deep:#9b7018;
    --fnc-ink:#191714;
    --fnc-muted:#77716a;
    --fnc-line:rgba(28,24,19,.09);
    --fnc-surface:#fffdf9;
    --fnc-shadow:0 10px 30px rgba(31,24,14,.07);
}

/* The chapter list itself */
.wp-block-query.fncql-premium-directory .wp-block-post-template{
    counter-reset:fnc-chapter;
    gap:0!important;
    margin:0;
    padding:0;
}

/* Each chapter row/card */
.wp-block-query.fncql-premium-directory .wp-block-post-template > .wp-block-post{
    counter-increment:fnc-chapter;
    position:relative;
    display:flex;
    align-items:center;
    gap:18px;
    min-height:68px;
    margin:0!important;
    padding:14px 18px;
    box-sizing:border-box;
    border-bottom:1px solid var(--fnc-line);
    background:transparent;
    transition:background .18s ease,transform .18s ease,box-shadow .18s ease;
}

/* Subtle first/last rounding when the theme provides a visible list container */
.wp-block-query.fncql-premium-directory .wp-block-post-template > .wp-block-post:first-child{
    border-top-left-radius:14px;
    border-top-right-radius:14px;
}
.wp-block-query.fncql-premium-directory .wp-block-post-template > .wp-block-post:last-child{
    border-bottom:0;
    border-bottom-left-radius:14px;
    border-bottom-right-radius:14px;
}

/* Premium chapter number */
.wp-block-query.fncql-premium-directory .wp-block-post-template > .wp-block-post::before{
    content:counter(fnc-chapter,decimal-leading-zero);
    flex:0 0 42px;
    width:42px;
    height:42px;
    display:flex;
    align-items:center;
    justify-content:center;
    border:1px solid rgba(201,154,46,.28);
    border-radius:12px;
    background:linear-gradient(145deg,#fffdf7,#f5ead0);
    color:var(--fnc-gold-deep);
    font-family:Georgia,"Times New Roman",serif;
    font-size:13px;
    font-weight:700;
    letter-spacing:.03em;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.9);
}

/* Make the title occupy the main row */
.wp-block-query.fncql-premium-directory .wp-block-post-template > .wp-block-post > .wp-block-post-title{
    flex:1 1 auto;
    min-width:0;
    margin:0!important;
    line-height:1.35;
}

/* Title link */
.wp-block-query.fncql-premium-directory .wp-block-post-title a{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:8px;
    width:100%;
    color:var(--fnc-ink);
    text-decoration:none;
    font-size:16px;
    font-weight:650;
    letter-spacing:-.01em;
    transition:color .18s ease;
}

/* Let title-wrapper classes control state */
.wp-block-query.fncql-premium-directory .fncql-chapter-title.fncql-locked a{
    color:#6d6254;
}
.wp-block-query.fncql-premium-directory .fncql-chapter-title.fncql-unlocked a{
    color:var(--fnc-ink);
}
.wp-block-query.fncql-premium-directory .fncql-chapter-title.fncql-free a{
    color:var(--fnc-ink);
}

.wp-block-query.fncql-premium-directory .wp-block-post:hover{
    background:linear-gradient(90deg,rgba(201,154,46,.055),rgba(255,255,255,.65));
    transform:translateX(3px);
    box-shadow:var(--fnc-shadow);
}

.wp-block-query.fncql-premium-directory .wp-block-post:hover .wp-block-post-title a{
    color:var(--fnc-gold-deep);
}

/* Gold lock */
.fncql-lock-badge{
    display:inline-flex!important;
    align-items:center;
    justify-content:center;
    gap:6px;
    flex:0 0 auto;
    margin-left:auto;
    padding:6px 9px;
    min-height:28px;
    box-sizing:border-box;
    border:1px solid rgba(201,154,46,.38);
    border-radius:999px;
    background:linear-gradient(180deg,#fff8dc,#f2d88e);
    color:#9b7018;
    font-family:inherit;
    font-size:11px;
    font-weight:800;
    line-height:1;
    letter-spacing:.035em;
    text-transform:uppercase;
    text-decoration:none!important;
    box-shadow:0 2px 8px rgba(130,92,15,.13),inset 0 1px 0 rgba(255,255,255,.9);
    white-space:nowrap;
}

.fncql-lock-svg{
    width:14px;
    height:14px;
    display:block;
    fill:none;
    stroke:currentColor;
    stroke-width:1.8;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.fncql-status-badge{
    display:inline-flex!important;
    align-items:center;
    gap:6px;
    flex:0 0 auto;
    margin-left:auto;
    padding:6px 9px;
    min-height:28px;
    box-sizing:border-box;
    border-radius:999px;
    font-size:11px;
    font-weight:800;
    line-height:1;
    white-space:nowrap;
}

.fncql-unlocked-badge{
    border:1px solid rgba(70,128,76,.18);
    background:rgba(70,128,76,.07);
    color:#46784a;
}

.fncql-free-badge{
    border:1px solid rgba(70,70,70,.10);
    background:rgba(70,70,70,.045);
    color:#746f68;
}

.fncql-status-dot{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:15px;
    height:15px;
    border-radius:50%;
    font-size:10px;
    font-weight:900;
}

.fncql-unlocked-badge .fncql-status-dot{
    border:1px solid rgba(70,128,76,.25);
}
.fncql-free-badge .fncql-status-dot{
    font-size:16px;
    line-height:10px;
}

.fncql-coin-price{
    display:inline-flex;
    align-items:center;
    gap:5px;
    flex:0 0 auto;
    margin-left:4px;
    padding:4px 7px;
    border-radius:7px;
    background:rgba(201,154,46,.09);
    color:#9b7018;
    font-size:11px;
    font-weight:800;
    line-height:1;
    white-space:nowrap;
}

.fncql-coin-icon{
    font-size:9px;
    transform:rotate(45deg);
    display:inline-block;
}

/* Keep lock/status badges at the right when the title is a flex link. */
.wp-block-query.fncql-premium-directory .wp-block-post-title a .fncql-lock-badge,
.wp-block-query.fncql-premium-directory .wp-block-post-title a .fncql-status-badge{
    margin-left:auto;
}

/* If the theme already gives the post a card/background, don't fight it. */
.wp-block-query.fncql-premium-directory .wp-block-post-template.is-layout-grid > .wp-block-post{
    border:1px solid var(--fnc-line);
    border-radius:16px;
    background:var(--fnc-surface);
    padding:18px;
}
.wp-block-query.fncql-premium-directory .wp-block-post-template.is-layout-grid{
    gap:12px!important;
}
.wp-block-query.fncql-premium-directory .wp-block-post-template.is-layout-grid > .wp-block-post:hover{
    transform:translateY(-2px);
}

/* If the Query Loop has excerpts/date blocks, keep them visually secondary. */
.wp-block-query.fncql-premium-directory .wp-block-post > :not(.wp-block-post-title):not(.fncql-chapter-title){
    color:var(--fnc-muted);
}

/* Accessibility: keyboard focus */
.wp-block-query.fncql-premium-directory .wp-block-post-title a:focus-visible{
    outline:2px solid var(--fnc-gold);
    outline-offset:4px;
    border-radius:5px;
}

/* Mobile */
@media (max-width:700px){
    .wp-block-query.fncql-premium-directory .wp-block-post-template > .wp-block-post{
        min-height:62px;
        gap:12px;
        padding:11px 12px;
    }

    .wp-block-query.fncql-premium-directory .wp-block-post-template > .wp-block-post::before{
        flex-basis:36px;
        width:36px;
        height:36px;
        border-radius:10px;
        font-size:11px;
    }

    .wp-block-query.fncql-premium-directory .wp-block-post-title a{
        font-size:15px;
        gap:6px;
    }

    .fncql-lock-badge,
    .fncql-status-badge{
        padding:5px 7px;
        min-height:26px;
        font-size:10px;
    }

    .fncql-coin-price{
        font-size:10px;
        padding:4px 6px;
    }
}

@media (max-width:460px){
    .wp-block-query.fncql-premium-directory .wp-block-post-template > .wp-block-post{
        gap:9px;
        padding:10px 9px;
    }

    .wp-block-query.fncql-premium-directory .wp-block-post-template > .wp-block-post::before{
        flex-basis:31px;
        width:31px;
        height:31px;
        border-radius:9px;
        font-size:10px;
    }

    .wp-block-query.fncql-premium-directory .wp-block-post-title a{
        font-size:14px;
    }

    .fncql-lock-badge,
    .fncql-status-badge{
        padding:5px;
        border-radius:50%;
        width:27px;
        height:27px;
        margin-left:auto!important;
    }

    .fncql-lock-badge .fncql-status-text,
    .fncql-status-badge .fncql-status-text{
        display:none;
    }

    .fncql-coin-price{
        padding:4px 5px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion:reduce){
    .wp-block-query.fncql-premium-directory .wp-block-post,
    .wp-block-query.fncql-premium-directory .wp-block-post-title a,
    .fncql-lock-badge{
        transition:none!important;
    }
}

/* 2.1.0 — Book cover, blurb and reader comments */
.fnc-book-intro{
    --fnc-gold:#c99a2e;
    --fnc-gold-deep:#9b7018;
    --fnc-ink:#191714;
    --fnc-muted:#77716a;
    --fnc-line:rgba(28,24,19,.09);
    max-width:980px;
    margin:0 auto 34px;
    padding:28px;
    display:flex;
    align-items:center;
    gap:30px;
    border:1px solid var(--fnc-line);
    border-radius:24px;
    background:linear-gradient(145deg,#fffdf9,#f8f1e3);
    box-shadow:0 18px 45px rgba(31,24,14,.08);
}
.fnc-book-cover-wrap{
    flex:0 0 190px;
    width:190px;
    position:relative;
}
.fnc-book-cover-wrap:after{
    content:"";
    position:absolute;
    inset:5px -7px -7px 7px;
    border-radius:4px 12px 12px 4px;
    border:1px solid rgba(155,112,24,.2);
    z-index:0;
}
.fnc-book-cover-image{
    position:relative;
    z-index:1;
    display:block;
    width:100%;
    height:auto;
    max-height:285px;
    object-fit:cover;
    border-radius:5px 12px 12px 5px;
    box-shadow:0 14px 30px rgba(40,28,13,.2);
}
.fnc-book-info{flex:1;min-width:0}
.fnc-book-kicker,.fnc-comments-kicker{
    margin:0 0 7px;
    color:var(--fnc-gold-deep);
    font-size:11px;
    font-weight:800;
    letter-spacing:.14em;
    text-transform:uppercase;
}
.fnc-book-title{
    margin:0 0 14px;
    color:var(--fnc-ink);
    font-family:Georgia,"Times New Roman",serif;
    font-size:clamp(27px,4vw,42px);
    line-height:1.08;
    letter-spacing:-.025em;
}
.fnc-book-blurb{
    max-width:680px;
    color:var(--fnc-muted);
    font-size:15px;
    line-height:1.8;
}
.fnc-book-blurb p{margin:0}

.fnc-book-comments{
    max-width:980px;
    margin:0 auto 42px;
    padding:25px 28px 28px;
    border:1px solid var(--fnc-line);
    border-radius:20px;
    background:#fff;
    box-shadow:0 10px 30px rgba(31,24,14,.055);
}
.fnc-book-comments-heading{
    margin-bottom:20px;
    padding-bottom:15px;
    border-bottom:1px solid var(--fnc-line);
}
.fnc-book-comments-heading h2{
    margin:0;
    color:var(--fnc-ink);
    font-family:Georgia,"Times New Roman",serif;
    font-size:26px;
}
.fnc-book-comments .comment-list,
.fnc-book-comments .commentlist{margin:0;padding:0;list-style:none}
.fnc-book-comments .comment{margin:0 0 18px;padding:16px;border:1px solid var(--fnc-line);border-radius:14px;background:#fffdf9}
.fnc-book-comments .comment:last-child{margin-bottom:0}
.fnc-book-comments .comment-meta{font-size:12px;color:var(--fnc-muted)}
.fnc-book-comments .comment-content{font-size:14px;line-height:1.7;color:#403b35}
.fnc-book-comments .comment-respond{margin-top:24px;padding-top:22px;border-top:1px solid var(--fnc-line)}
.fnc-book-comments .comment-form input[type="text"],
.fnc-book-comments .comment-form input[type="email"],
.fnc-book-comments .comment-form input[type="url"],
.fnc-book-comments .comment-form textarea{
    width:100%;box-sizing:border-box;border:1px solid rgba(28,24,19,.14);border-radius:10px;padding:11px 12px;background:#fff;font:inherit;
}
.fnc-book-comments .comment-form textarea{min-height:120px;resize:vertical}
.fnc-book-comments .comment-form input:focus,
.fnc-book-comments .comment-form textarea:focus{outline:2px solid rgba(201,154,46,.35);border-color:var(--fnc-gold)}
.fnc-book-comments .comment-form input[type="submit"],
.fnc-book-comments .comment-form button{
    border:0;border-radius:10px;padding:11px 18px;background:#191714;color:#fff;font-weight:800;cursor:pointer;
}
.fnc-book-comments .comment-form input[type="submit"]:hover,
.fnc-book-comments .comment-form button:hover{background:#9b7018}

@media(max-width:700px){
    .fnc-book-intro{margin-bottom:24px;padding:20px;gap:20px;border-radius:18px;align-items:flex-start}
    .fnc-book-cover-wrap{flex-basis:125px;width:125px}
    .fnc-book-cover-image{max-height:190px}
    .fnc-book-title{font-size:27px}
    .fnc-book-blurb{font-size:14px;line-height:1.65}
    .fnc-book-comments{padding:20px;margin-bottom:30px;border-radius:16px}
}
@media(max-width:480px){
    .fnc-book-intro{display:block;text-align:center;padding:18px}
    .fnc-book-cover-wrap{width:145px;margin:0 auto 18px}
    .fnc-book-cover-image{max-height:215px}
    .fnc-book-blurb{text-align:left}
    .fnc-book-comments{text-align:left}
}

/* 2.2.0 book intro */
.fnc-book-intro{display:grid;grid-template-columns:minmax(150px,220px) 1fr;gap:32px;align-items:start;margin:0 0 30px;padding:28px;border:1px solid rgba(201,154,46,.18);border-radius:24px;background:linear-gradient(145deg,#fffdf9,#f8f2e6);box-shadow:0 16px 45px rgba(31,24,14,.08)}
.fnc-book-cover-wrap{display:flex;justify-content:center}.fnc-book-cover-image{display:block;width:100%;max-width:220px;height:auto;aspect-ratio:2/3;object-fit:cover;border-radius:14px;box-shadow:0 16px 30px rgba(30,22,10,.2)}
.fnc-book-kicker,.fnc-comments-kicker{margin:0 0 7px;font-size:11px;font-weight:900;letter-spacing:.14em;text-transform:uppercase;color:#9b7018}.fnc-book-title{margin:0 0 15px;font-family:Georgia,"Times New Roman",serif;font-size:clamp(27px,4vw,44px);line-height:1.05;color:#1d1811}
.fnc-book-blurb-wrap{position:relative}.fnc-book-blurb{font-size:16px;line-height:1.7;font-weight:700;color:#332d26}.fnc-book-blurb p{margin:0}.fnc-book-blurb-wrap:not(.is-expanded) .fnc-book-blurb{display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;max-height:6.8em}.fnc-blurb-toggle{margin-top:9px;padding:0;border:0;background:none;color:#9b7018;font:inherit;font-size:13px;font-weight:900;cursor:pointer}.fnc-blurb-toggle:hover{text-decoration:underline}.fnc-book-views{display:inline-flex;align-items:center;gap:9px;margin-top:20px;padding:9px 13px;border:1px solid rgba(201,154,46,.25);border-radius:999px;background:rgba(255,255,255,.65);color:#756348;font-size:12px;font-weight:700}.fnc-book-views strong{font-size:15px;color:#9b7018}.fnc-views-icon{width:23px;height:23px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;background:linear-gradient(145deg,#f5d77f,#b98319);color:#fff;font-size:11px;box-shadow:0 3px 8px rgba(155,112,24,.25)}
.fnc-book-comments{margin:28px 0 34px;padding:24px;border-radius:20px;background:#fff;border:1px solid rgba(28,24,19,.08);box-shadow:0 10px 30px rgba(31,24,14,.05)}.fnc-book-comments-heading h2{margin:0 0 18px;font-size:24px;color:#1d1811}
@media(max-width:700px){.fnc-book-intro{grid-template-columns:1fr;gap:20px;padding:20px}.fnc-book-cover-image{max-width:190px}.fnc-book-title{font-size:30px}.fnc-book-blurb{font-size:15px}.fnc-book-info{text-align:center}.fnc-book-blurb-wrap{margin-left:auto;margin-right:auto}.fnc-book-views{margin-left:auto;margin-right:auto}}

/* 2.2.1 — premium views counter polish */
.fnc-book-views{
    position:relative;
    overflow:hidden;
    letter-spacing:.01em;
}
.fnc-book-views:before{
    content:"";
    position:absolute;
    inset:0;
    background:linear-gradient(105deg,transparent 25%,rgba(255,255,255,.7) 48%,transparent 70%);
    transform:translateX(-120%);
    animation:fncViewsShine 4.5s ease-in-out infinite;
    pointer-events:none;
}
@keyframes fncViewsShine{0%,65%{transform:translateX(-120%)}85%,100%{transform:translateX(120%)}}
.fnc-book-views > *{position:relative;z-index:1}
.fnc-book-blurb{font-weight:700;font-size:16px;line-height:1.7}
.fnc-book-blurb-wrap:not(.is-expanded) .fnc-book-blurb{
    display:-webkit-box;
    -webkit-line-clamp:4;
    -webkit-box-orient:vertical;
    overflow:hidden;
}


/* 2.2.3 — prevent duplicate excerpt/description on desktop and laptop.
   The PHP layer removes the Query Loop Post Excerpt; this is a defensive
   presentation rule for themes that wrap the excerpt in another container. */
@media (min-width:701px){
    .wp-block-query.fncql-premium-directory .wp-block-post-excerpt{
        display:none !important;
    }
}


/* 2.2.2 — reference-style Read more + Views placement */
.fnc-book-blurb-wrap{
    width:100%;
}
.fnc-blurb-toggle{
    display:flex;
    align-items:center;
    justify-content:center;
    width:100%;
    margin:12px 0 0;
    padding:0;
    border:0;
    background:transparent!important;
    color:#9b7018!important;
    font-size:14px;
    line-height:1.2;
    font-weight:900;
    cursor:pointer;
    text-align:center;
}
.fnc-blurb-toggle:hover{
    text-decoration:none;
    color:#9b7018!important;
}
.fnc-blurb-chevron{
    margin-left:5px;
    font-size:14px;
    line-height:1;
    transform:translateY(-1px);
    transition:transform .18s ease;
}
.fnc-book-blurb-wrap.is-expanded .fnc-blurb-chevron{
    transform:rotate(180deg) translateY(1px);
}

.fnc-book-views{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:9px;
    width:max-content;
    min-width:178px;
    margin:14px auto 0;
    padding:8px 15px 8px 8px;
    box-sizing:border-box;
    border:1px solid rgba(201,154,46,.25);
    border-radius:999px;
    background:rgba(255,255,255,.78);
    color:#756348;
    font-size:14px;
    line-height:1;
    font-weight:600;
    box-shadow:0 2px 7px rgba(155,112,24,.07);
}
.fnc-views-icon{
    width:38px;
    height:38px;
    flex:0 0 38px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:50%;
    background:radial-gradient(circle at 35% 30%,#f9df8a 0%,#d8a72f 48%,#b27d17 100%);
    color:#fff;
    box-shadow:0 3px 8px rgba(155,112,24,.20),inset 0 1px 2px rgba(255,255,255,.55);
}
.fnc-views-icon svg{
    width:17px;
    height:17px;
    display:block;
    fill:none;
    stroke:#fff;
    stroke-width:1.8;
    stroke-linecap:round;
    stroke-linejoin:round;
}
.fnc-book-views-count{
    color:#756348;
    white-space:nowrap;
}
@media(max-width:700px){
    .fnc-book-views{
        min-width:178px;
        margin-top:14px;
        padding:7px 14px 7px 7px;
        font-size:14px;
    }
    .fnc-views-icon{
        width:38px;
        height:38px;
        flex-basis:38px;
    }
}
