/*
Theme Name: Vanisha Novel
Template: astra
Description: Vanisha Novel brand child theme, built on Astra. Matches the colors, logo, and typography used on the main forum.
Version: 1.1.0
Text Domain: vanisha-astra-child
*/

:root {
    --vn-cream: #FDF6F0;
    --vn-white: #FFFFFF;
    --vn-pink: #D94F8C;
    --vn-pink-dark: #B93B75;
    --vn-pink-cta: #E85D9B;
    --vn-border: #F3E3D9;
    --vn-border-light: #F6EEE8;
    --vn-highlight: #F6DDE8;
    --vn-text: #4A3B35;
    --vn-text-muted: #8B7D76;
    --vn-text-dimmed: #B0A19A;
    --vn-footer-gradient: linear-gradient(135deg, #FCEEF4 0%, #FDF6F0 100%);
    --vn-content-font-size: 20px;
    --vn-shadow: 0 8px 24px rgba(74, 59, 53, 0.12);
}

html[data-theme="dark"] {
    --vn-cream: #221A18;
    --vn-white: #2C2220;
    --vn-pink: #F27AA9;
    --vn-pink-dark: #F4A0C2;
    --vn-pink-cta: #E85D9B;
    --vn-border: #4A3B37;
    --vn-border-light: #3A2E2B;
    --vn-highlight: #3D2A31;
    --vn-text: #F3E8E2;
    --vn-text-muted: #C9B8B1;
    --vn-text-dimmed: #9C8B84;
    --vn-footer-gradient: linear-gradient(135deg, #2C1F24 0%, #221A18 100%);
    --vn-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

html[data-theme="dark"] body {
    background-color: var(--vn-cream) !important;
}

/* Astra hardcodes white backgrounds directly on these - not covered by our
   variables above, so they must be pinned explicitly for dark mode. */
html[data-theme="dark"] article,
html[data-theme="dark"] .ast-article-single,
html[data-theme="dark"] .site-below-footer-wrap,
html[data-theme="dark"] .ast-builder-grid-row-container-inner,
html[data-theme="dark"] .ast-builder-footer-grid-columns {
    background-color: transparent !important;
}


body {
    background-color: var(--vn-cream) !important;
    color: var(--vn-text);
    transition: background-color .25s ease, color .25s ease;
}

.site-header,
.ast-primary-header-bar,
.site-footer,
.entry-content,
.ast-footer-copyright p {
    transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}

a {
    color: var(--vn-pink);
}

a:hover,
a:focus {
    color: var(--vn-pink-dark);
}

/* Header / logo area */
.site-header,
.ast-primary-header-bar {
    background-color: var(--vn-white) !important;
    border-bottom: 1px solid var(--vn-border);
}

.site-logo-img img,
.custom-logo {
    max-height: 76px;
    width: auto;
}

.site-title a,
.site-title a:hover {
    color: var(--vn-text) !important;
}

.main-header-menu .menu-item > .menu-link {
    color: var(--vn-text) !important;
}

.main-header-menu .menu-item > .menu-link:hover,
.main-header-menu .current-menu-item > .menu-link {
    color: var(--vn-pink) !important;
}

/* Mobile hamburger/close icon - the toggle button itself is pink (see the
   generic button rule below), so the lines need to be white to stay visible
   instead of Astra's default blue. */
.ast-mobile-svg {
    fill: #fff !important;
}

/* Astra's built-in scroll-to-top button, in brand pink instead of default blue. */
.ast-scroll-top-icon {
    background-color: var(--vn-pink-cta) !important;
}

.ast-scroll-top-icon:hover {
    background-color: var(--vn-pink-dark) !important;
}

/* Buttons */
.ast-button,
button,
input[type="submit"],
.wp-block-button__link {
    background-color: var(--vn-pink-cta) !important;
    border-color: var(--vn-pink-cta) !important;
    color: #fff !important;
    border-radius: 999px !important;
    font-weight: 700;
    letter-spacing: .02em;
    box-shadow: 0 6px 16px rgba(232, 93, 155, 0.3);
}

.ast-button:hover,
button:hover,
input[type="submit"]:hover,
.wp-block-button__link:hover {
    background-color: var(--vn-pink-dark) !important;
    border-color: var(--vn-pink-dark) !important;
}

/* Single post page */
.single .ast-container,
.single #primary .ast-container,
.single .content-area .ast-container {
    max-width: 960px !important;
}

.single .entry-header .entry-title {
    color: var(--vn-pink-dark);
}

.single .entry-content {
    background-color: var(--vn-white);
    border: 1px solid var(--vn-border);
    border-radius: 16px;
    padding: 32px;
    max-width: none;
    font-size: var(--vn-content-font-size);
    transition: font-size .15s ease, background-color .25s ease, color .25s ease;
}

.single .entry-content p {
    font-size: inherit;
}

.single .entry-content h1,
.single .entry-content h2,
.single .entry-content h3 {
    color: var(--vn-pink-dark);
}

.single .entry-meta,
.entry-meta * {
    color: var(--vn-text-dimmed) !important;
}

.single .entry-content blockquote {
    border-left: 4px solid var(--vn-pink);
    background-color: var(--vn-highlight);
    border-radius: 8px;
    padding: 16px 20px;
    color: var(--vn-text);
}

/* Footer */
.site-footer,
.ast-small-footer {
    background: var(--vn-footer-gradient) !important;
    border-top: 1px solid var(--vn-border);
    margin-top: 48px;
}

.site-below-footer-wrap {
    padding: 36px 0;
}

.ast-footer-copyright {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
}

.ast-footer-copyright img {
    height: 34px;
    width: 34px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 3px 10px rgba(185, 59, 117, 0.25);
    flex-shrink: 0;
}

.ast-footer-copyright p {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--vn-pink-dark);
}

.site-footer a {
    color: var(--vn-pink-dark) !important;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ==========================================================
   Floating reader bar (font size + light/dark theme)
   One pill, centered at the bottom of the viewport. Appears
   while scrolling, auto-hides a couple seconds after scrolling
   stops. Sits above Astra's own scroll-to-top button (right:30px
   bottom:30px) since it's centered, not on the right edge.
   Pure client-side, backed by localStorage - no network calls.
   ========================================================== */

.vn-reader-bar {
    position: fixed;
    left: 50%;
    bottom: 28px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--vn-pink-cta) 0%, var(--vn-pink-dark) 100%);
    box-shadow: 0 10px 30px rgba(185, 59, 117, 0.35);
    transform: translate(-50%, 16px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s;
}

.vn-reader-bar.vn-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
    transition: opacity .25s ease, transform .25s ease;
}

.vn-reader-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background-color: transparent;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: background-color .2s ease;
}

.vn-reader-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.vn-reader-btn svg {
    width: 17px;
    height: 17px;
}

.vn-reader-divider {
    width: 1px;
    height: 22px;
    background-color: rgba(255, 255, 255, 0.3);
    margin: 0 2px;
}

.vn-font-size-indicator {
    min-width: 34px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}

@media (max-width: 480px) {
    .vn-reader-bar {
        bottom: 20px;
    }
    .vn-reader-btn {
        width: 34px;
        height: 34px;
    }
}
