/* ── Hide default WordPress audio player to prevent flash before custom one loads ── */
.wp-audio-shortcode {
    display: none !important;
}

/* ── Container ───────────────────────────────────────────────────────────── */
.pts-player {
    max-width: 700px;
    margin: 20px auto;
    font-family: inherit;
    position: relative;
}

/* ── Toggle button ───────────────────────────────────────────────────────── */
.pts-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: #1c1c1e !important;
    color: #aaa !important;
    border: 1px solid #333 !important;
    border-radius: 8px !important;
    padding: 10px 16px !important;
    font-size: 14px !important;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    gap: 8px;
    box-shadow: none !important;
}
.pts-toggle:hover { background: #252527 !important; color: #fff !important; }
.pts-toggle[aria-expanded="true"] {
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    color: #fff !important;
}
.pts-toggle:disabled { opacity: 0.4; cursor: default; }
.pts-arrow { font-size: 10px; opacity: 0.5; }

/* ── Dropdown ────────────────────────────────────────────────────────────── */
.pts-dropdown {
    background: #0e0e10;
    border: 1px solid #2a2a2e;
    border-top: none;
    border-radius: 0 0 10px 10px;
    overflow: hidden;
}

/* ── Search ──────────────────────────────────────────────────────────────── */
.pts-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-bottom: 1px solid #1e1e22;
    background: #141416 !important;
}
.pts-search-icon { font-size: 13px; opacity: 0.3; flex-shrink: 0; }
.pts-search {
    flex: 1;
    background: #1a1a1e !important;
    color: #ccc !important;
    border: 1px solid #2a2a30 !important;
    border-radius: 6px !important;
    padding: 7px 10px !important;
    font-size: 13px !important;
    outline: none !important;
    box-shadow: none !important;
    transition: border-color 0.2s;
    min-width: 0;
    -webkit-appearance: none;
    appearance: none;
}
.pts-search::placeholder { color: #3a3a44 !important; }
.pts-search:focus { border-color: #404048 !important; background: #1e1e24 !important; color: #eee !important; }
.pts-search-clear {
    background: none !important; border: none !important; color: #444 !important;
    font-size: 13px !important; cursor: pointer; padding: 4px 6px !important;
    border-radius: 4px !important; flex-shrink: 0;
    transition: color 0.15s; box-shadow: none !important;
}
.pts-search-clear:hover { color: #bbb !important; }

/* ── Search results ──────────────────────────────────────────────────────── */
.pts-search-results {
    background: #0a0a0d;
    border-bottom: 1px solid #1a1a20;
    max-height: 200px;
    overflow-y: auto;
    scrollbar-color: #2a2a36 #0a0a0d;
    scrollbar-width: thin;
}
.pts-search-results::-webkit-scrollbar       { width: 4px; }
.pts-search-results::-webkit-scrollbar-track { background: #0a0a0d; }
.pts-search-results::-webkit-scrollbar-thumb { background: #2a2a36; border-radius: 2px; }
.pts-result {
    display: flex; align-items: baseline; gap: 10px;
    padding: 9px 14px; cursor: pointer;
    border-bottom: 1px solid #111118;
    transition: background 0.12s;
}
.pts-result:last-child { border-bottom: none; }
.pts-result:hover { background: #12121a; }
.pts-result:hover .pts-result-cta { opacity: 1; }
.pts-result-time { font-size: 11px; color: #383848; min-width: 34px; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.pts-result-text { flex: 1; font-size: 13px; color: #606070; line-height: 1.4; }
.pts-result-text mark { background: transparent; color: #9090cc; font-weight: 600; }
.pts-result-cta { font-size: 11px; color: #383858; opacity: 0; transition: opacity 0.12s; flex-shrink: 0; }
.pts-no-results { padding: 12px 14px; font-size: 13px; color: #333340; text-align: center; }

/* ── Three-line display + nav ────────────────────────────────────────────── */
.pts-display-outer {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    width: 100% !important;
}

.pts-display {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 110px;
    padding: 14px 18px 14px 20px;
    cursor: default;
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-y;
    position: relative;
    overflow: hidden;
}

/* gradient fade top & bottom */
.pts-display::before,
.pts-display::after {
    content: "";
    position: absolute;
    left: 0; right: 0;
    height: 28px;
    pointer-events: none;
    z-index: 1;
}
.pts-display::before { top: 0;    background: linear-gradient(to bottom, #0e0e10, transparent); }
.pts-display::after  { bottom: 0; background: linear-gradient(to top,   #0e0e10, transparent); }

/* lines */
.pts-line {
    font-size: 15px;
    line-height: 1.65;
    text-align: left;
    padding: 4px 8px;
    transition: color 0.2s, border-color 0.15s;
    white-space: normal;
    word-break: break-word;
    cursor: pointer;
    border-left: 3px solid transparent;
    border-radius: 2px;
}
.pts-line-above,
.pts-line-below {
    color: #cccccc;
    font-weight: 400;
}
.pts-line-above:hover,
.pts-line-below:hover {
    color: #e8e8e8;
    border-left-color: #333350;
}
.pts-line-current {
    color: #ffffff;
    font-weight: 600;
    border-left-color: #4444aa;
}
.pts-line-current:hover {
    border-left-color: #6666cc;
}

/* timestamp */
.pts-seg-time {
    font-size: 11px;
    color: #333340;
    text-align: left;
    margin-top: 6px;
    padding-left: 11px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
}

/* ── Click hint ─────────────────────────────────────────────────────────── */
.pts-click-hint {
    font-size: 10px;
    color: #252530;
    text-align: left;
    padding-left: 11px;
    margin-top: 4px;
    letter-spacing: 0.03em;
    animation: pts-hint-fade 8s ease forwards;
}
@keyframes pts-hint-fade {
    0%   { opacity: 0; }
    10%  { opacity: 1; }
    70%  { opacity: 1; }
    100% { opacity: 0; }
}

/* ── Nav buttons ─────────────────────────────────────────────────────────── */
.pts-nav-buttons {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px;
    padding: 6px 8px 6px 4px;
    background: #0e0e10;
    border-left: 1px solid #1a1a1e;
    flex-shrink: 0 !important;
    min-width: 44px !important;
}
.pts-nav-btn {
    background: #16161a !important;
    border: 1px solid #222228 !important;
    color: #383840 !important;
    width: 28px; height: 28px;
    border-radius: 6px !important;
    font-size: 10px !important;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    padding: 0 !important; box-shadow: none !important;
}
.pts-nav-btn:hover:not(:disabled) {
    background: #202028 !important;
    color: #c0c0d0 !important;
    border-color: #303040 !important;
}
.pts-nav-btn:disabled { opacity: 0.15; cursor: default; }

/* ── Jump to now ─────────────────────────────────────────────────────────── */
.pts-jump-now {
    position: absolute !important;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    clip: rect(0,0,0,0) !important;
    clip-path: inset(50%) !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    pointer-events: none !important;
}
.pts-jump-now.pts-visible {
    clip: auto !important;
    clip-path: none !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
    white-space: nowrap !important;
    pointer-events: auto !important;
    background: #1e1e60 !important;
    color: #8888ff !important;
    border: 1px solid #2a2a80 !important;
    border-radius: 20px !important;
    padding: 5px 16px !important;
    font-size: 12px !important;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(100,100,255,0.15) !important;
    transition: background 0.15s, color 0.15s;
    line-height: 1.4;
    margin: 6px auto !important;
}
.pts-jump-now:hover {
    background: #2a2a80 !important;
    color: #aaaaff !important;
}

/* ── Resize handle ───────────────────────────────────────────────────────── */
.pts-resize-handle {
    height: 10px;
    background: #0e0e10;
    border-top: 1px solid #1a1a1e;
    cursor: ns-resize;
    display: flex; align-items: center; justify-content: center;
}
.pts-resize-handle::after {
    content: "";
    width: 28px; height: 3px;
    background: #202024;
    border-radius: 2px;
}
.pts-resize-handle:hover::after { background: #404048; }

/* ── Mobile ──────────────────────────────────────────────────────────────── */
@media (max-width: 500px) {
    .pts-line { font-size: 14px; }
    .pts-display { min-height: 100px; padding: 12px 14px; }
}
