/* ============================================================
   Mark Mason's PDF Flipper — Frontend Styles v1.0
   Created by Paul Cutler
   Dark-magazine theme · Full feature set
   ============================================================ */

/* ── CSS CUSTOM PROPERTIES (overridable via inline style) ───── */
.pdfflip-outer {
    --pf-accent:        #d0d0d0;
    --pf-accent-hover:  #ffffff;
    --pf-bg:            #111827;
    --pf-stage-bg:      #0d1117;
    --pf-ctrl-bg:       rgba(255,255,255,0.06);
    --pf-ctrl-border:   rgba(255,255,255,0.12);
    --pf-text:          rgba(255,255,255,0.85);
    --pf-text-dim:      rgba(255,255,255,0.4);
    --pf-shadow:        rgba(0,0,0,0.8);
    --pf-radius:        10px;
    --pf-font:          -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* ── FRAME / BORDER ──────────────────────────────────────────
       Default: 1px subtle grey — clean professional look.
       Override per-flipper via shortcode: border="#ff0000" etc.
    ─────────────────────────────────────────────────────────── */
    --pf-border-color:  #888888;
    --pf-border-width:  1px;
    --pf-border-style:  solid;
}

/* ── LIGHT THEME ─────────────────────────────────────────────── */
.pdfflip-outer[data-theme="light"] {
    --pf-accent:        #4a7fa5;
    --pf-accent-hover:  #2e6a8e;
    --pf-bg:            #f0f2f5;
    --pf-stage-bg:      #e2e6eb;
    --pf-ctrl-bg:       rgba(0,0,0,0.05);
    --pf-ctrl-border:   rgba(0,0,0,0.12);
    --pf-text:          rgba(0,0,0,0.80);
    --pf-text-dim:      rgba(0,0,0,0.38);
    --pf-shadow:        rgba(0,0,0,0.18);
    --pf-border-color:  #b0b8c4;
}

/* ── SEPIA THEME ─────────────────────────────────────────────── */
.pdfflip-outer[data-theme="sepia"] {
    --pf-accent:        #a0784a;
    --pf-accent-hover:  #c49460;
    --pf-bg:            #2a2118;
    --pf-stage-bg:      #1c1610;
    --pf-ctrl-bg:       rgba(210,185,140,0.07);
    --pf-ctrl-border:   rgba(210,185,140,0.15);
    --pf-text:          rgba(225,205,165,0.88);
    --pf-text-dim:      rgba(225,205,165,0.40);
    --pf-shadow:        rgba(0,0,0,0.75);
    --pf-border-color:  #6b5535;
}

/* ═══════════════════════════════════════════════════════════════
   OUTER WRAPPER
   Width + height set by JS to exactly the cover canvas size.
   Centred with margin:auto. Everything inside is absolute.
═══════════════════════════════════════════════════════════════ */
.pdfflip-outer {
    position: relative;
    /* JS sets exact pixel width/height — these are just fallbacks */
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    border-radius: var(--pf-radius);
    overflow: hidden;
    font-family: var(--pf-font);
    -webkit-font-smoothing: antialiased;
    border: var(--pf-border-width) var(--pf-border-style) var(--pf-border-color);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
    min-height: 60px;
}

/* ═══════════════════════════════════════════════════════════════
   COVER OVERLAY — just wraps the canvas, nothing else
═══════════════════════════════════════════════════════════════ */
.pdfflip-cover-overlay {
    position: relative;
    display: block;
    line-height: 0;
    user-select: none;
    -webkit-user-select: none;
    cursor: pointer;
}

.pdfflip-cover-canvas-wrap {
    display: block;
    line-height: 0;
}

/* Placeholder shown while PDF loads — small, not full-height */
.pdfflip-cover-placeholder {
    width: 100%;
    height: 60px;
    background: rgba(128,128,128,0.15);
}

/* Canvas — do NOT set width/height, JS controls those */
.pdfflip-cover-canvas-wrap canvas {
    display: block;
}

/* View button — sits at the bottom centre of the cover.
   position:absolute relative to .pdfflip-outer.
   pointer-events:none so clicks fall through to the cover overlay. */
.pdfflip-view-btn {
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-family: var(--pf-font);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 10px 28px;
    border-radius: 30px;
    border: 2px solid rgba(255,255,255,0.7);
    pointer-events: none;
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════
   STAGE — fills the same box as the cover (position absolute)
   Hidden by default — JS shows it after cover click.
   padding-bottom keeps PDF content above the controls bar.
═══════════════════════════════════════════════════════════════ */
.pdfflip-stage {
    position: absolute;
    inset: 0;
    display: none;
    justify-content: center;
    align-items: flex-start; /* top-align — no dead space above PDF content */
    background: var(--pf-stage-bg);
    overflow: hidden;
    cursor: default;
    padding-bottom: 56px; /* matches CTRL_H — controls bar never overlaps PDF */
}

/* ── ZOOM STAGE (transform target) ─────────────────────────── */
.pdfflip-zoom-stage {
    display: flex;
    justify-content: center;
    align-items: center;
    will-change: transform;
    transform-origin: 50% 50%;
}

/* ── BOOK WRAP ───────────────────────────────────────────────── */
.pdfflip-book-wrap {
    position: relative;
    display: inline-flex;
    filter:
        drop-shadow(0 4px 8px  rgba(0,0,0,0.4))
        drop-shadow(0 20px 50px rgba(0,0,0,0.7))
        drop-shadow(0 40px 90px rgba(0,0,0,0.5));
    transition: filter 0.4s ease;
}

.pdfflip-outer:hover .pdfflip-book-wrap {
    filter:
        drop-shadow(0 4px 10px rgba(0,0,0,0.5))
        drop-shadow(0 25px 60px rgba(0,0,0,0.85))
        drop-shadow(0 2px 6px var(--pf-accent));
}

/* ── PAGE CONTAINER ─────────────────────────────────────────── */
.pdfflip-container {
    position: relative;
    display: block;
    box-shadow:
        0 4px 8px  rgba(0,0,0,0.4),
        0 20px 50px rgba(0,0,0,0.7),
        0 40px 90px rgba(0,0,0,0.5);
}

/* Single-page slot — canvas swaps in here on navigation */
.pf-page-slot {
    position: relative;
    overflow: hidden;
    background: #fff;
    user-select: none;
    -webkit-user-select: none;
}

.pf-page-slot canvas {
    display: block;
    position: relative;
    z-index: 2;
}

/* ── PAGE TURN ANIMATIONS ────────────────────────────────────── */
@keyframes pf-slide-out-left {
    from { transform: translateX(0);    opacity: 1; }
    to   { transform: translateX(-6%);  opacity: 0; }
}
@keyframes pf-slide-out-right {
    from { transform: translateX(0);    opacity: 1; }
    to   { transform: translateX(6%);   opacity: 0; }
}
@keyframes pf-slide-in-right {
    from { transform: translateX(6%);   opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}
@keyframes pf-slide-in-left {
    from { transform: translateX(-6%);  opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}

.pf-slide-out-left  { animation: pf-slide-out-left  0.28s ease forwards; }
.pf-slide-out-right { animation: pf-slide-out-right 0.28s ease forwards; }
.pf-slide-in-right  { animation: pf-slide-in-right  0.28s ease forwards; z-index: 3 !important; }
.pf-slide-in-left   { animation: pf-slide-in-left   0.28s ease forwards; z-index: 3 !important; }

/* ── SKELETON LOADING STATE ──────────────────────────────────── */
.pdfflip-skeleton {
    position: relative;
    overflow: hidden;
    background: #f0f0f0;
}

.pdfflip-skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent     0%,
        rgba(255,255,255,0.65) 50%,
        transparent     100%
    );
    animation: pf-skeleton-shimmer 1.5s ease-in-out infinite;
}

@keyframes pf-skeleton-shimmer {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.sk-line {
    position: absolute;
    height: 9px;
    background: #ddd;
    border-radius: 5px;
    left: 5%;
}

.sk-num {
    position: absolute;
    bottom: 10px;
    width: 100%;
    text-align: center;
    font-size: 11px;
    color: #bbb;
    font-weight: 300;
}

/* ═══════════════════════════════════════════════════════════════
   ANNOTATION LAYER (interactive links)
═══════════════════════════════════════════════════════════════ */
.pdfflip-annot-layer {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: auto;
}

.pdfflip-link {
    position: absolute;
    display: block;
    pointer-events: all;
    cursor: pointer;
    border-radius: 2px;
    box-sizing: border-box;
    transition: background-color 0.12s ease, outline 0.12s ease;
    outline: 1.5px solid transparent;
    z-index: 20;
}

.pdfflip-link:hover {
    background-color: rgba(66,133,244,0.14);
    outline-color: rgba(66,133,244,0.55);
}

.pdfflip-link:active {
    background-color: rgba(66,133,244,0.28);
}

/* ═══════════════════════════════════════════════════════════════
   LOADER
═══════════════════════════════════════════════════════════════ */
.pdfflip-loader {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: none;
    align-items: center;
    justify-content: center;
    background: var(--pf-stage-bg);
}

.pdfflip-loader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.pdfflip-spinner {
    width: 46px;
    height: 46px;
    border: 3px solid var(--pf-ctrl-border);
    border-top-color: var(--pf-accent);
    border-radius: 50%;
    animation: pf-spin 0.8s linear infinite;
}

@keyframes pf-spin { to { transform: rotate(360deg); } }

.pdfflip-loader-text {
    color: var(--pf-text-dim);
    font-size: 13px;
    letter-spacing: 0.04em;
    font-family: var(--pf-font);
}

.pdfflip-progress-bar {
    width: 200px;
    height: 3px;
    background: var(--pf-ctrl-border);
    border-radius: 2px;
    overflow: hidden;
}

.pdfflip-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--pf-accent), var(--pf-accent-hover));
    border-radius: 2px;
    transition: width 0.35s ease;
}

.pdfflip-error-msg {
    text-align: center;
    color: var(--pf-text);
    font-size: 14px;
    line-height: 1.7;
    padding: 20px;
    font-family: var(--pf-font);
}

.pdfflip-error-msg svg { display: block; margin: 0 auto 14px; }
.pdfflip-error-msg p   { margin: 0 0 6px; font-weight: 500; }
.pdfflip-error-msg small { display: block; opacity: 0.5; font-size: 12px; }

/* ═══════════════════════════════════════════════════════════════
   CONTROLS BAR
═══════════════════════════════════════════════════════════════ */
.pdfflip-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: none;  /* shown by JS */
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 14px 8px;
    background: rgba(0, 0, 0, 0.88);
    box-sizing: border-box;
}

/* ── BUTTONS ─────────────────────────────────────────────────── */
.pdfflip-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--pf-ctrl-bg);
    border: 1px solid var(--pf-ctrl-border);
    border-radius: 50%;
    color: var(--pf-text);
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
    outline: none;
    text-decoration: none;
    transition:
        background  0.18s ease,
        border-color 0.18s ease,
        color        0.18s ease,
        transform    0.12s ease,
        opacity      0.18s ease;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.pdfflip-btn:hover:not(:disabled) {
    background: var(--pf-accent);
    border-color: var(--pf-accent);
    color: #fff;
    transform: scale(1.1);
}

.pdfflip-btn:active:not(:disabled) {
    transform: scale(0.93);
}

.pdfflip-btn:disabled {
    opacity: 0.2;
    cursor: not-allowed;
    pointer-events: none;
}

.pdfflip-btn.active {
    background: var(--pf-accent);
    border-color: var(--pf-accent);
    color: #fff;
}

/* Zoom buttons — slightly smaller */
.pdfflip-btn-zoom-in,
.pdfflip-btn-zoom-out,
.pdfflip-btn-zoom-reset {
    width: 32px;
    height: 32px;
}

.pdfflip-btn-zoom-reset {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: -0.02em;
    border-radius: 6px;
    width: auto;
    padding: 0 8px;
}

/* Prev/Next — slightly larger */
.pdfflip-btn-prev,
.pdfflip-btn-next {
    width: 40px;
    height: 40px;
}

/* Download */
.pdfflip-btn-download {
    border-radius: 6px;
    width: auto;
    padding: 0 12px;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.03em;
}

/* ── SEPARATORS ─────────────────────────────────────────────── */
.pdfflip-ctrl-sep {
    width: 1px;
    height: 22px;
    background: var(--pf-ctrl-border);
    flex-shrink: 0;
    margin: 0 2px;
}

/* ── PAGE INFO ───────────────────────────────────────────────── */
.pdfflip-page-info {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 0 6px;
    color: var(--pf-text);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.02em;
    min-width: 72px;
    justify-content: center;
    flex-shrink: 0;
}

.pdfflip-current-page {
    color: var(--pf-accent);
    font-weight: 700;
    font-size: 15px;
    min-width: 22px;
    text-align: center;
    transition: opacity 0.15s;
}

.pdfflip-sep-slash { color: var(--pf-text-dim); }
.pdfflip-total-pages { color: var(--pf-text-dim); }

/* ── PAGE JUMP INPUT ─────────────────────────────────────────── */
.pdfflip-page-jump {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.pdfflip-page-jump-label {
    font-size: 11px;
    color: var(--pf-text-dim);
    letter-spacing: 0.04em;
}

.pdfflip-page-input {
    width: 46px;
    height: 30px;
    background: var(--pf-ctrl-bg);
    border: 1px solid var(--pf-ctrl-border);
    border-radius: 6px;
    color: var(--pf-text);
    font-size: 12px;
    text-align: center;
    padding: 0 4px;
    outline: none;
    transition: border-color 0.15s;
    font-family: var(--pf-font);
}

.pdfflip-page-input:focus {
    border-color: var(--pf-accent);
    background: rgba(255,255,255,0.1);
}

.pdfflip-page-input::placeholder {
    color: var(--pf-text-dim);
}

/* ── ZOOM LEVEL LABEL ─────────────────────────────────────────── */
.pdfflip-zoom-level {
    font-size: 11px;
    color: var(--pf-text-dim);
    min-width: 36px;
    text-align: center;
    letter-spacing: 0.03em;
    font-family: var(--pf-font);
}

/* ═══════════════════════════════════════════════════════════════
   THUMBNAIL STRIP
═══════════════════════════════════════════════════════════════ */
.pdfflip-thumbnails-bar {
    position: absolute;
    bottom: 60px; /* sits above the controls bar */
    left: 0;
    right: 0;
    z-index: 9;
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 6px;
    padding: 10px 14px;
    background: rgba(0,0,0,0.75);
    border-bottom: 1px solid var(--pf-ctrl-border);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;

    /* Custom scrollbar */
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
}

.pdfflip-thumbnails-bar::-webkit-scrollbar {
    height: 4px;
}
.pdfflip-thumbnails-bar::-webkit-scrollbar-track {
    background: transparent;
}
.pdfflip-thumbnails-bar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
}

/* ── INDIVIDUAL THUMB ────────────────────────────────────────── */
.pdfflip-thumb {
    position: relative;
    flex-shrink: 0;
    cursor: pointer;
    border-radius: 3px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
    opacity: 0.55;
}

.pdfflip-thumb:hover {
    opacity: 0.9;
    transform: translateY(-3px);
    border-color: rgba(255,255,255,0.35);
}

.pdfflip-thumb.active {
    border-color: var(--pf-accent);
    opacity: 1;
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.pdfflip-thumb canvas {
    display: block;
}

.pdfflip-thumb-num {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 9px;
    color: #fff;
    background: rgba(0,0,0,0.55);
    padding: 2px 0;
    line-height: 1.3;
    font-family: var(--pf-font);
}

/* ═══════════════════════════════════════════════════════════════
   READY FADE-IN ANIMATION
   Stage is display:none until JS shows it, so we animate via
   a .pdfflip-ready class added at the same time as display:''
═══════════════════════════════════════════════════════════════ */
.pdfflip-outer.pdfflip-ready .pdfflip-stage {
    animation: pf-fade-in 0.3s ease both;
}

.pdfflip-outer.pdfflip-ready .pdfflip-controls {
    animation: pf-fade-in 0.3s ease 0.1s both;
}

@keyframes pf-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ═══════════════════════════════════════════════════════════════
   LIGHTBOX BACKDROP
   A full-screen dark overlay injected into <body> by JS
═══════════════════════════════════════════════════════════════ */
.pdfflip-backdrop {
    position: fixed;
    inset: 0;
    z-index: 99998;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    transition:
        background    0.3s ease,
        backdrop-filter 0.3s ease;
    pointer-events: none;
}

.pdfflip-backdrop.pdfflip-backdrop-open {
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    pointer-events: all;
}

/* ═══════════════════════════════════════════════════════════════
   FLIPPER IN LIGHTBOX MODE
   Positioned fixed, centred on screen, above the backdrop
═══════════════════════════════════════════════════════════════ */
.pdfflip-outer.pdfflip-in-lightbox {
    position: fixed !important;
    z-index: 99999;

    /* Centred on screen with generous padding */
    top:    50% !important;
    left:   50% !important;
    width:  min(96vw, 1400px) !important;
    max-height: 94vh;
    transform: translate(-50%, -50%) scale(0.96);
    transform-origin: center center;

    border-radius: 12px !important;
    overflow: hidden;
    overflow-y: auto;

    /* Border carries through; glow echoes the border colour in lightbox */
    box-shadow:
        inset 0 0 0 1px rgba(0, 0, 0, 0.35),
        0  0   0   1px rgba(0, 0, 0, 0.6),
        0  8px  32px rgba(0, 0, 0, 0.6),
        0 32px  80px rgba(0, 0, 0, 0.8),
        0  0   60px var(--pf-border-color),
        0  0  120px rgba(0, 0, 0, 0.5);

    /* Animate in */
    animation: pf-lightbox-in 0.32s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

@keyframes pf-lightbox-in {
    from { transform: translate(-50%, -50%) scale(0.92); opacity: 0.6; }
    to   { transform: translate(-50%, -50%) scale(1);    opacity: 1;   }
}

/* Taller stage in lightbox so the book fills the space */
.pdfflip-outer.pdfflip-in-lightbox .pdfflip-stage {
    min-height: min(70vh, 700px);
    background: var(--pf-stage-bg);
}

/* ── CLOSE BUTTON ───────────────────────────────────────────── */
.pdfflip-lightbox-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 100001;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    padding: 0;
    outline: none;
    transition: background 0.18s ease, transform 0.15s ease, border-color 0.18s ease;
    -webkit-tap-highlight-color: transparent;
}

.pdfflip-lightbox-close:hover {
    background: var(--pf-accent, #e94560);
    border-color: var(--pf-accent, #e94560);
    transform: scale(1.1) rotate(90deg);
}

.pdfflip-lightbox-close:active {
    transform: scale(0.92) rotate(90deg);
}

/* ═══════════════════════════════════════════════════════════════
   COVER PAGE GLOW
═══════════════════════════════════════════════════════════════ */
.pdfflip-on-cover .pdfflip-book-wrap {
    filter:
        drop-shadow(0 8px 16px rgba(0,0,0,0.6))
        drop-shadow(0 30px 70px rgba(0,0,0,0.85))
        drop-shadow(0 0 40px rgba(255,255,255,0.04));
}

/* ═══════════════════════════════════════════════════════════════
   PORTRAIT / MOBILE MODE
═══════════════════════════════════════════════════════════════ */
.pdfflip-outer.pdfflip-portrait .pdfflip-stage {
    padding: 10px 0 8px;
}

@media (max-width: 640px) {
    .pdfflip-stage { padding: 10px 0 8px; }

    .pdfflip-controls {
        gap: 4px;
        padding: 8px 10px 10px;
    }

    .pdfflip-btn { width: 32px; height: 32px; }
    .pdfflip-btn-prev, .pdfflip-btn-next { width: 36px; height: 36px; }

    .pdfflip-ctrl-sep { display: none; }

    .pdfflip-page-jump-label { display: none; }

    .pdfflip-btn-download span { display: none; }
    .pdfflip-btn-download { padding: 0; width: 32px; }
}

@media (max-width: 400px) {
    .pdfflip-btn-zoom-reset { display: none; }
    .pdfflip-zoom-level     { display: none; }
}


/* ═══════════════════════════════════════════════════════════════
   MISC
═══════════════════════════════════════════════════════════════ */
.pdfflip-error {
    color: #e74c3c;
    padding: 12px 16px;
    background: #2d0f0f;
    border: 1px solid #5a1a1a;
    border-radius: 6px;
    font-size: 14px;
    font-family: var(--pf-font, sans-serif);
}

/* ═══════════════════════════════════════════════════════════════
   PDF TITLE — sits above the flipper outer box, centred
═══════════════════════════════════════════════════════════════ */
.pdfflip-title {
    display: block;
    text-align: center;
    margin: 0 0 10px;
    font-size: 1.4em;
    font-weight: 600;
    line-height: 1.3;
    color: inherit;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ═══════════════════════════════════════════════════════════════
   BODY SCROLL LOCK — applied when lightbox is open
═══════════════════════════════════════════════════════════════ */
body.pdfflip-body-lb {
    overflow: hidden;
}

/* Tooltip on buttons */
.pdfflip-btn[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    background: rgba(0,0,0,0.85);
    color: #fff;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    pointer-events: none;
    z-index: 100;
    font-family: var(--pf-font, sans-serif);
    letter-spacing: 0.02em;
}
