/*
Theme Name: MS Press
Theme URI: https://example.com/ms-press
Author: Custom MS Press Dev
Description: MS Press-style Educational Q&A Theme with Advanced Formatting, Customizer, Dynamic Layouts & Fonts
Version: 2.8.4
License: GNU General Public License v2 or later
Text Domain: ms-press
*/

/* ==========================================================================
   1. GLOBAL STYLES & DYNAMIC VARIABLES
   ========================================================================== */
:root {
    --primary-color: #2563eb;
    --qam-q-border: #27ae60;
    --qam-expert-border: #27ae60;
    --qam-user-border: #1062fe;
    --bg-light: #f8fafc;
    --text-dark: #1e293b;
    --sidebar-box-bg: #ffffff;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: var(--site-font, 'Poppins', sans-serif);
    background-color: var(--bg-light);
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Global Responsive Images & Tables Fix */
img, iframe, object, embed {
    max-width: 100% !important;
    height: auto !important;
}

table {
    width: 100% !important;
    display: block;
    overflow-x: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ==========================================================================
   2. DYNAMIC WEBSITE LAYOUT GRID (SIDEBAR POSITIONS)
   ========================================================================== */
.site-main-layout-wrapper {
    display: flex;
    gap: 24px;
    margin-top: 25px;
    margin-bottom: 40px;
}

.layout-right_sidebar .main-content-column,
.layout-left_sidebar .main-content-column,
body.layout-right_sidebar .main-content-column,
body.layout-left_sidebar .main-content-column {
    width: 70%;
}

.layout-left_sidebar .site-main-layout-wrapper,
body.layout-left_sidebar .site-main-layout-wrapper {
    flex-direction: row-reverse;
}

.layout-no_sidebar .main-content-column,
body.layout-no_sidebar .main-content-column {
    width: 100%;
}

.layout-both_sidebars .main-content-column,
body.layout-both_sidebars .main-content-column {
    width: 50%;
}

.layout-both_sidebars .sidebar-column-left,
.layout-both_sidebars .sidebar-column-right,
body.layout-both_sidebars .sidebar-column-left,
body.layout-both_sidebars .sidebar-column-right {
    width: 25%;
}

.sidebar-column {
    width: 30%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-box {
    background: var(--sidebar-box-bg);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid #e2e8f0;
}

/* ==========================================================================
   3. THREE-LAYER HEADER STYLES
   ========================================================================== */
.site-header-three-layer {
    width: 100%;
    position: relative;
    z-index: 9999;
}

.middle-header.is-fixed-sticky {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 99999 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08) !important;
}

.lower-header.is-fixed-sticky {
    position: fixed !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 99998 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12) !important;
}

/* BRANDING ANIMATIONS */
.middle-brand-section {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.anim-effect-pulse:hover,
.is-fixed-sticky .anim-effect-pulse {
    animation: brandPulse 2s infinite ease-in-out;
}
@keyframes brandPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.04); }
    100% { transform: scale(1); }
}

/* UPPER HEADER */
.upper-header {
    border-bottom: 1px solid #e2e8f0;
    font-size: 13px;
    color: #64748b;
}
.upper-header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.upper-header-meta span {
    margin-right: 15px;
    font-weight: 500;
}
.upper-menu-wrap {
    display: flex;
    flex-grow: 1;
}

.upper-sub-navigation ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 15px !important;
}
.upper-sub-navigation ul li { display: inline-block !important; }
.upper-sub-navigation ul li a {
    text-decoration: none;
    color: #64748b;
    font-weight: 500;
    transition: color 0.2s;
}

/* MIDDLE MAIN HEADER */
.middle-header {
    border-bottom: 1px solid #e2e8f0;
    transition: background-color 0.3s ease;
}
.middle-header-container {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.middle-brand-section {
    width: 30%;
    display: flex;
    align-items: center;
    gap: 12px;
}
.site-identity-text .site-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
}
.site-identity-text .site-title a { color: #0f172a; text-decoration: none; }

.middle-nav-section {
    width: 70%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}
.main-navigation ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
}
.main-navigation ul li { position: relative; display: inline-block !important; }
.main-navigation ul li a {
    text-decoration: none;
    color: #334155;
    font-weight: 600;
    padding: 8px 14px;
    display: block;
    border-radius: 20px;
}

/* LOWER SEARCH HEADER */
.lower-header-flex-grid {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px;
}

.lower-search-section { width: 80%; }
.search-input-wrapper {
    display: flex !important;
    align-items: center !important;
    background: #f1f5f9;
    border-radius: 30px;
    padding: 4px 6px 4px 18px;
}
.search-input-wrapper .search-field {
    width: 100%;
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    padding: 6px;
}
.search-submit-btn {
    background: var(--primary-color);
    color: #ffffff;
    border: none;
    padding: 8px 22px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    min-height: 40px;
}

.lower-button-section {
    width: 20%;
    display: flex !important;
    justify-content: flex-end !important;
}

.btn-lower-custom {
    padding: 10px 22px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    border-radius: 20px;
    min-height: 42px;
}

/* ==========================================================================
   4. ADVANCED RESPONSIVE MEDIA QUERIES (MOBILE & TABLET)
   ========================================================================== */
@media (max-width: 992px) {
    .site-main-layout-wrapper {
        flex-direction: column !important;
    }
    .main-content-column, 
    .sidebar-column,
    .layout-both_sidebars .main-content-column,
    .layout-both_sidebars .sidebar-column-left,
    .layout-both_sidebars .sidebar-column-right {
        width: 100% !important;
    }
}

@media (max-width: 768px) {
    .upper-header-container {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    .middle-header-container {
        flex-direction: column !important;
        gap: 12px;
    }
    .middle-brand-section, 
    .middle-nav-section {
        width: 100% !important;
        justify-content: center !important;
    }
    .main-navigation ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    .lower-header-flex-grid {
        flex-direction: column !important;
        gap: 12px;
    }
    .lower-search-section, 
    .lower-button-section {
        width: 100% !important;
        justify-content: center !important;
    }
    .btn-lower-custom {
        width: 100%;
        text-align: center;
    }
}

/* ==========================================================================
   5. QUESTION BOX USER HEADER ADDITIONS
   ========================================================================== */
.question-author-avatar img {
    border: 2px solid #2563eb;
    object-fit: cover;
}

/* Guarantee every avatar rendered by qam_get_user_avatar_html() is a
   perfect circle everywhere in the theme (Question Box, both Answer
   Boxes, Sidebar, Leaderboards, Profile Page), regardless of any other
   conflicting rule. */
.qam-avatar-img,
img.avatar.qam-avatar-img {
    border-radius: 50% !important;
    object-fit: cover !important;
}

/* ==========================================================================
   6. CATEGORY BADGE & CUSTOMIZER STYLING
   ========================================================================== */
.qam-cat-badge {
    position: absolute;
    z-index: 10;
}
.qam-cat-pos-top-right {
    top: 15px;
    right: 15px;
}
.qam-cat-pos-top-left {
    top: 15px;
    left: 15px;
}

.qam-cat-badge a {
    display: inline-block;
    padding: 4px 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

/* Category Badge Visual Styles */
.qam-cat-fx-badge-solid a {
    border-style: solid;
}
.qam-cat-fx-badge-outline a {
    background-color: transparent !important;
    border-style: solid;
}
.qam-cat-fx-badge-glow a {
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.25);
}
.qam-cat-fx-badge-noborder a {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

/* Category Shapes */
.qam-cat-shape-rounded a { border-radius: 6px; }
.qam-cat-shape-square a  { border-radius: 0px; }
.qam-cat-shape-pill a    { border-radius: 50px; }

/* Report Flag Button */
.qam-report-btn {
    border: none;
    background: transparent;
    color: #dc2626;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}
.qam-report-btn:hover {
    color: #991b1b;
    transform: scale(1.05);
}
.qam-report-btn.disabled {
    color: #94a3b8;
    cursor: not-allowed;
}

/* Box Customizer Animations & Effects */
.qb-anim-hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.qb-anim-hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.qb-anim-fade-in {
    animation: qbFadeIn 0.6s ease-in-out;
}
@keyframes qbFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.qb-anim-slide-up {
    animation: msSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.qb-anim-zoom-in {
    animation: msZoomIn 0.4s ease forwards;
}

.qb-anim-hover-bounce:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.qb-anim-border-glow:hover {
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.3);
    transition: box-shadow 0.3s ease;
}

/* Entrance Animations & Keyframes */
.ms-anim-fade-in { animation: msFadeIn 0.6s ease-in-out forwards; }
@keyframes msFadeIn { from { opacity: 0; } to { opacity: 1; } }

.ms-anim-slide-up { animation: msSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes msSlideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.ms-anim-zoom-in { animation: msZoomIn 0.4s ease forwards; }
@keyframes msZoomIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }

.ms-anim-hover-bounce:hover { transform: translateY(-4px); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08); }

/* EXPERT ANSWER BOX STYLING */
.expert-answer-card {
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.08);
}
.expert-answer-card:hover {
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.15);
}

/* ==========================================================================
   SIDEBAR PROFILE CARD (Login/Sign-Up button + Logged-in profile + Logout)
   ========================================================================== */
.qam-profile-card {
    text-align: center;
    padding: 20px 16px;
}
.qam-profile-card .profile-header {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}
.qam-profile-card .profile-header h3 {
    margin: 0 0 4px 0;
    font-size: 15px;
    color: var(--text-dark);
}
.qam-profile-card .badge-rank {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: #b45309;
    background: #fef3c7;
    padding: 2px 8px;
    border-radius: 10px;
}
.qam-profile-card .divider {
    border: none;
    border-top: 1px solid #f1f5f9;
    margin: 14px 0;
}
.qam-profile-card .points-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 14px;
}
.qam-profile-card .stat-item {
    display: flex;
    flex-direction: column;
}
.qam-profile-card .stat-num {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color, #2563eb);
}
.qam-profile-card .stat-label {
    font-size: 12px;
    color: #64748b;
}
.qam-profile-card .guest-desc {
    font-size: 13.5px;
    color: #64748b;
    margin: 8px 0 16px 0;
}

.sidebar-login-btn,
.sidebar-logout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    box-sizing: border-box;
    cursor: pointer;
}
.sidebar-login-btn {
    background: var(--primary-color, #2563eb);
    color: #ffffff;
}
.sidebar-login-btn:hover { background: #1d4ed8; color: #ffffff; }

.sidebar-logout-btn {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}
.sidebar-logout-btn:hover { background: #fee2e2; }

/* ==========================================================================
   RICH-FORMATTED ANSWER CONTENT (Community Answer Box: lists, quotes, links)
   ========================================================================== */
.answer-text ul,
.answer-text ol {
    margin: 8px 0 8px 22px;
    padding: 0;
}
.answer-text li { margin-bottom: 4px; }
.answer-text blockquote {
    border-left: 3px solid #cbd5e1;
    margin: 10px 0;
    padding: 6px 14px;
    color: #475569;
    font-style: italic;
    background: #f8fafc;
}
.answer-text a {
    color: #2563eb;
    text-decoration: underline;
}

.qam-edit-btn {
    flex-shrink: 0;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
}
.qam-edit-btn:hover { background: #e2e8f0; }
.qam-delete-btn {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}
.qam-delete-btn:hover { background: #fee2e2; }

/* ==========================================================================
   SIDEBAR: ACHIEVEMENTS BLOCK
   ========================================================================== */
.qam-achievements-title {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin: 0 0 10px 0;
    text-align: left;
}
.qam-achievement-row {
    display: flex;
    justify-content: space-between;
    font-size: 13.5px;
    padding: 5px 0;
    color: #334155;
}
.qam-achievement-row strong { color: #0f172a; }

/* ==========================================================================
   SIDEBAR: CUSTOM LINKS WIDGET
   ========================================================================== */
.qam-links-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.qam-link-chip {
    display: block;
    text-align: center;
    background: #f1f5f9;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 8px;
    border-radius: 8px;
    text-decoration: none;
}
.qam-link-chip:hover { background: #e2e8f0; }

/* ==========================================================================
   SIDEBAR: LEADERBOARD WIDGET
   ========================================================================== */
.qam-leaderboard-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.qam-leaderboard-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
}
.qam-leaderboard-rank {
    font-weight: 700;
    color: #94a3b8;
    width: 24px;
    flex-shrink: 0;
}
.qam-leaderboard-row img { border-radius: 50%; flex-shrink: 0; }
.qam-leaderboard-name {
    color: #1e293b;
    font-weight: 600;
    text-decoration: none;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.qam-leaderboard-meta {
    color: #94a3b8;
    font-size: 11.5px;
    white-space: nowrap;
}

/* ==========================================================================
   ADVERTISEMENT SPACE (Post Page)
   ========================================================================== */
.qam-ad-space {
    text-align: center;
    margin: 20px 0;
    overflow: hidden;
}

/* ==========================================================================
   EDITOR MODAL: RIGHT-SIDE SLIDE PANEL (MS Press Style)
   (Question Editor + Answer Editor only — scoped to .qam-editor-modal-overlay
   so the Login/Sign-Up Auth Modal, which reuses the base .qam-modal-* classes,
   is completely unaffected and keeps its small centered form look.)

   Desktop: a panel slides in from the right, covering ~65% of the screen
   width. The remaining left portion stays a translucent backdrop, so the
   original Question the user is answering (already on the page behind it)
   stays clearly visible and readable — not a heavy full-screen block.

   Mobile: the panel expands to cover the full screen, since there simply
   isn't room for a split view on a small 9:16 screen.
   ========================================================================== */

.qam-modal-window-controls {
    position: absolute;
    top: 14px;
    right: 16px;
    display: flex;
    gap: 8px;
    z-index: 5;
}
.qam-win-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    padding: 0;
}
.qam-win-btn:hover { background: #eef2ff; color: #1e293b; }
.qam-win-close:hover { background: #fee2e2; color: #b91c1c; }

/* The overlay is a light, translucent backdrop — NOT an opaque block —
   so the original page (with the question) stays visible on the left. */
.qam-editor-modal-overlay.active {
    display: flex;
    justify-content: flex-end;
    align-items: stretch;
    padding: 0;
    background: rgba(15, 23, 42, 0.35);
}

.qam-editor-modal-overlay .qam-editor-modal {
    width: 65%;
    max-width: 720px;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    box-sizing: border-box;
    box-shadow: -8px 0 30px rgba(0,0,0,0.18);
    animation: qamSlideInRight 0.22s ease;
}
.qam-editor-modal-overlay .qam-editor-modal .qam-question-editor-body {
    flex: 1;
    min-height: 200px;
    max-height: none;
}

@keyframes qamSlideInRight {
    from { transform: translateX(30px); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}

/* Mobile: full-screen, since a 9:16 phone screen has no room for a split view */
@media (max-width: 768px) {
    .qam-editor-modal-overlay .qam-editor-modal {
        width: 100%;
        max-width: 100vw;
    }
}

/* ==========================================================================
   RESPONSIVE / MOBILE-FRIENDLY PASS
   ========================================================================== */
@media (max-width: 900px) {
    .site-main-layout-wrapper,
    .container.site-main-layout-wrapper {
        display: block !important;
    }
    .sidebar-column-right {
        width: 100% !important;
        margin-top: 24px;
    }
}

@media (max-width: 600px) {
    .qam-modal-box {
        padding: 20px 16px;
        max-width: 94vw;
    }
    .qam-question-modal-title { font-size: 17px; }
    .qam-editor-toolbar { gap: 4px; }
    .qam-tool-btn { padding: 5px 8px; font-size: 12px; }
    .qam-mcq-options,
    .qam-mcq-options-section .qam-mcq-options { grid-template-columns: 1fr !important; }
    .qam-answer-actions-row { flex-direction: column; align-items: flex-start; }
    .qam-answer-profile-row { flex-wrap: wrap; }
    .qam-links-grid { grid-template-columns: 1fr; }
    .points-stats { flex-wrap: wrap; }
}

/* ==========================================================================
   6 CUSTOM QUOTE / BLOCKQUOTE STYLES  (WordPress Block Editor)
   Colors/fonts come from Customizer via CSS variables (set per is-style-*
   class in functions.php); only shape/layout is defined here.
   ========================================================================== */
.wp-block-quote[class*="is-style-qam-quote-"] {
    background: var(--qam-q-bg, #f8fafc);
    color: var(--qam-q-color, #1e293b);
    font-size: var(--qam-q-size, 18px);
    font-family: var(--qam-q-font-en, Georgia), serif;
    box-sizing: border-box;
}
.wp-block-quote[class*="is-style-qam-quote-"] p {
    font-size: inherit;
    color: inherit;
    margin: 0;
}
.wp-block-quote[class*="is-style-qam-quote-"]:lang(hi),
.wp-block-quote[class*="is-style-qam-quote-"] :lang(hi) {
    font-family: var(--qam-q-font-hi, Mangal), 'Noto Sans Devanagari', sans-serif;
}

/* Style 1: Classic Large Quotes — big inverted commas, no box */
.wp-block-quote.is-style-qam-quote-classic {
    border: none;
    padding: 34px 54px;
    position: relative;
    font-style: italic;
    text-align: center;
}
.wp-block-quote.is-style-qam-quote-classic::before,
.wp-block-quote.is-style-qam-quote-classic::after {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 64px;
    line-height: 1;
    color: var(--qam-q-border, #2563eb);
    position: absolute;
    opacity: 0.85;
}
.wp-block-quote.is-style-qam-quote-classic::before { content: "\201C"; top: 6px; left: 8px; }
.wp-block-quote.is-style-qam-quote-classic::after  { content: "\201D"; bottom: -14px; right: 8px; }

/* Style 2: Small Quote Box — middle-aligned, thick left border */
.wp-block-quote.is-style-qam-quote-box {
    max-width: 460px;
    margin: 20px auto;
    padding: 16px 22px;
    border: none;
    border-left: 6px var(--qam-q-border-style, solid) var(--qam-q-border, #2563eb);
    border-radius: 4px;
}

/* Style 3: Modern Compact Quote — small elegant quote mark + modern border */
.wp-block-quote.is-style-qam-quote-modern {
    border: 1px var(--qam-q-border-style, solid) var(--qam-q-border, #2563eb);
    border-radius: 10px;
    padding: 18px 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}
.wp-block-quote.is-style-qam-quote-modern::before {
    content: "\201C";
    font-size: 26px;
    color: var(--qam-q-border, #2563eb);
    margin-right: 4px;
    font-family: Georgia, serif;
}

/* Style 4: Oval / Circle Shape Box — no quote marks, oval border */
.wp-block-quote.is-style-qam-quote-oval {
    border: 2px var(--qam-q-border-style, solid) var(--qam-q-border, #2563eb);
    border-radius: 50% / 26%;
    padding: 42px 64px;
    text-align: center;
}

/* Style 5: Rectangular Card Box — clean padded card */
.wp-block-quote.is-style-qam-quote-card {
    border: 1px var(--qam-q-border-style, solid) var(--qam-q-border, #2563eb);
    border-radius: 6px;
    padding: 24px 28px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}

/* Style 6: Square Badge Box — square-ish, centered, all-round border */
.wp-block-quote.is-style-qam-quote-badge {
    border: 3px var(--qam-q-border-style, solid) var(--qam-q-border, #2563eb);
    border-radius: 4px;
    padding: 26px;
    max-width: 360px;
    margin: 20px auto;
    text-align: center;
}

@media (max-width: 600px) {
    .wp-block-quote.is-style-qam-quote-classic { padding: 26px 20px; }
    .wp-block-quote.is-style-qam-quote-classic::before,
    .wp-block-quote.is-style-qam-quote-classic::after { font-size: 44px; }
    .wp-block-quote.is-style-qam-quote-oval { padding: 30px 24px; }
    .wp-block-quote.is-style-qam-quote-badge { max-width: 100%; }
}

/* ==========================================================================
   8 MORE CUSTOM QUOTE / BLOCKQUOTE STYLES (Styles 7–14)
   Same shared base rule above (.wp-block-quote[class*="is-style-qam-quote-"])
   already supplies background/color/font-size/fonts from the Customizer —
   only shape/layout is added here, same convention as Styles 1–6.
   ========================================================================== */

/* Style 7: Full Circle Box — text centered inside a perfect circle, no quote marks */
.wp-block-quote.is-style-qam-quote-circle {
    border: 2px var(--qam-q-border-style, solid) var(--qam-q-border, #2563eb);
    border-radius: 50%;
    width: 260px;
    height: 260px;
    max-width: 88vw;
    max-height: 88vw;
    margin: 24px auto;
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: auto;
}

/* Style 8: Large Round Bracket ( ) — height grows to match the text, no quote marks.
   Two full-height curved pseudo-elements (top:0/bottom:0) form the "(" and ")". */
.wp-block-quote.is-style-qam-quote-round-bracket {
    border: none;
    position: relative;
    padding: 10px 38px;
    text-align: center;
}
.wp-block-quote.is-style-qam-quote-round-bracket::before,
.wp-block-quote.is-style-qam-quote-round-bracket::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 16px;
    border: 3px var(--qam-q-border-style, solid) var(--qam-q-border, #2563eb);
}
.wp-block-quote.is-style-qam-quote-round-bracket::before {
    left: 0;
    border-right: none;
    border-radius: 50% 0 0 50% / 50% 0 0 50%;
}
.wp-block-quote.is-style-qam-quote-round-bracket::after {
    right: 0;
    border-left: none;
    border-radius: 0 50% 50% 0 / 0 50% 50% 0;
}

/* Style 9: Large Square Bracket [ ] — same idea as Style 8 but square/angular corners */
.wp-block-quote.is-style-qam-quote-square-bracket {
    border: none;
    position: relative;
    padding: 10px 34px;
    text-align: center;
}
.wp-block-quote.is-style-qam-quote-square-bracket::before,
.wp-block-quote.is-style-qam-quote-square-bracket::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 12px;
    border-top: 3px var(--qam-q-border-style, solid) var(--qam-q-border, #2563eb);
    border-bottom: 3px var(--qam-q-border-style, solid) var(--qam-q-border, #2563eb);
}
.wp-block-quote.is-style-qam-quote-square-bracket::before {
    left: 0;
    border-left: 3px var(--qam-q-border-style, solid) var(--qam-q-border, #2563eb);
}
.wp-block-quote.is-style-qam-quote-square-bracket::after {
    right: 0;
    border-right: 3px var(--qam-q-border-style, solid) var(--qam-q-border, #2563eb);
}

/* Style 10: Small Corner Brackets — a small "[" right at the start of the first word
   and "]" right at the end of the last word only (no matter how long the text is),
   no inverted commas. */
.wp-block-quote.is-style-qam-quote-corner-mark {
    border: none;
    padding: 6px 4px;
}
.wp-block-quote.is-style-qam-quote-corner-mark p::before {
    content: "[";
    margin-right: 3px;
    color: var(--qam-q-border, #2563eb);
    font-weight: 700;
}
.wp-block-quote.is-style-qam-quote-corner-mark p::after {
    content: "]";
    margin-left: 3px;
    color: var(--qam-q-border, #2563eb);
    font-weight: 700;
}

/* Style 11: Notebook Ruled Lines — line-height, background-size, AND the
   background-position offset now ALL come from Customizer-controlled CSS
   variables (--qam-nb-line-height / --qam-nb-position), so an Admin can
   nudge the ruled lines up or down from the Customizer panel itself
   (Blockquote Master Settings -> Notebook Ruled Lines) until the text
   sits exactly centered between two lines — no code edit needed. */
.wp-block-quote.is-style-qam-quote-notebook {
    border: none;
    padding: 6px 18px 10px;
    background-image: linear-gradient(var(--qam-q-border, #2563eb) 1px, transparent 1px);
    background-size: 100% var(--qam-nb-line-height, 38px);
    background-position: 0 var(--qam-nb-position, 30px);
    background-repeat: repeat;
    position: relative;
}
.wp-block-quote.is-style-qam-quote-notebook,
.wp-block-quote.is-style-qam-quote-notebook p,
.wp-block-quote.is-style-qam-quote-notebook strong,
.wp-block-quote.is-style-qam-quote-notebook b,
.wp-block-quote.is-style-qam-quote-notebook em,
.wp-block-quote.is-style-qam-quote-notebook i,
.wp-block-quote.is-style-qam-quote-notebook span {
    line-height: var(--qam-nb-line-height, 38px) !important;
}
.wp-block-quote.is-style-qam-quote-notebook p { margin: 0; }
.wp-block-quote.is-style-qam-quote-notebook::before {
    content: "\201C";
    color: var(--qam-q-border, #2563eb);
    font-size: 1.3em;
    line-height: var(--qam-nb-line-height, 38px);
    margin-right: 2px;
}
.wp-block-quote.is-style-qam-quote-notebook::after {
    content: "\201D";
    color: var(--qam-q-border, #2563eb);
    font-size: 1.3em;
    line-height: 34px;
    margin-left: 2px;
}

/* Style 12: Vertical Side Lines — a thick line on the left AND right only
   (no top/bottom lines), no quote marks. */
.wp-block-quote.is-style-qam-quote-vertical-lines {
    border-top: none;
    border-bottom: none;
    border-left: 5px var(--qam-q-border-style, solid) var(--qam-q-border, #2563eb);
    border-right: 5px var(--qam-q-border-style, solid) var(--qam-q-border, #2563eb);
    padding: 14px 22px;
}

/* Style 13: Horizontal Top/Bottom Lines — a thick line above AND below only
   (no left/right lines), no quote marks. */
.wp-block-quote.is-style-qam-quote-horizontal-lines {
    border-left: none;
    border-right: none;
    border-top: 5px var(--qam-q-border-style, solid) var(--qam-q-border, #2563eb);
    border-bottom: 5px var(--qam-q-border-style, solid) var(--qam-q-border, #2563eb);
    padding: 16px 10px;
}

/* Style 14: Vertical Sidebar Box — meant to sit beside the main text. Defaults to
   floating on the right; width = 1/4 of the page and height grows with the text;
   double thin-line border (from the Customizer's "Border Style" = Double default)
   with rounded corners; no quote marks.
   To place it on the LEFT of the text instead for a particular answer, just add
   this to Customizer -> Additional CSS:
     .is-style-qam-quote-sidebar-box { float: left !important; margin: 6px 24px 16px 0 !important; } */
.wp-block-quote.is-style-qam-quote-sidebar-box {
    border: 6px var(--qam-q-border-style, double) var(--qam-q-border, #2563eb);
    border-radius: 14px;
    width: 25%;
    min-width: 180px;
    float: right;
    margin: 6px 0 16px 24px;
    padding: 18px 16px;
}

@media (max-width: 782px) {
    .wp-block-quote.is-style-qam-quote-sidebar-box {
        float: none;
        width: 100%;
        margin: 16px 0;
    }
    .wp-block-quote.is-style-qam-quote-circle {
        width: 220px;
        height: 220px;
        padding: 22px;
    }
    .wp-block-quote.is-style-qam-quote-round-bracket,
    .wp-block-quote.is-style-qam-quote-square-bracket {
        padding-left: 26px;
        padding-right: 26px;
    }
}

/* ==========================================================================
   Style 15: Handwriting Shadow Box
   Elegant box with a customizable drop shadow, bilingual handwriting
   fonts (Kalam/Tillana for Hindi, Caveat/Shadows Into Light for English),
   and 5 interchangeable start/end accent styles set via the Customizer.
   ========================================================================== */
.wp-block-quote.is-style-qam-quote-handwriting {
    border: 1px var(--qam-q-border-style, solid) var(--qam-q-border, #2563eb);
    border-radius: 12px;
    padding: 28px 34px;
    position: relative;
    box-shadow: var(--qam-hw-shadow, 0 6px 18px rgba(0,0,0,0.16));
    font-size: calc(var(--qam-q-size, 18px) + 4px);
}
.wp-block-quote.is-style-qam-quote-handwriting::before,
.wp-block-quote.is-style-qam-quote-handwriting::after {
    color: var(--qam-q-border, #2563eb);
    font-weight: 700;
    font-size: 1.3em;
}
.wp-block-quote.is-style-qam-quote-handwriting::before {
    content: var(--qam-hw-accent-before, "\201C");
    margin-right: 4px;
}
.wp-block-quote.is-style-qam-quote-handwriting::after {
    content: var(--qam-hw-accent-after, "\201D");
    margin-left: 4px;
}

@media (max-width: 600px) {
    .wp-block-quote.is-style-qam-quote-handwriting { padding: 22px 20px; }
}