/**
 * Notation & Piano Roll Viewer — frontend styles.
 *
 * Dual-theme (dark + light) via the `npr-theme-light` class on .npr-viewer.
 * Default is dark. Responsive layout works inside any WordPress content area.
 */

/* ================================================================ */
/*  Theme tokens                                                     */
/* ================================================================ */

.npr-viewer {
        /* Dark theme (default) */
        --npr-bg: #0f1115;
        --npr-surface: #1a1d24;
        --npr-surface-2: #232730;
        --npr-border: #2d323d;
        --npr-text: #e5e7eb;
        --npr-text-muted: #9ca3af;
        --npr-primary: #f59e0b;
        --npr-primary-hover: #d97706;
        --npr-accent: #ef4444;
        --npr-track-1: #ef4444;
        --npr-track-2: #10b981;
        --npr-track-3: #8b5cf6;
        --npr-track-4: #f97316;
        --npr-sheet-bg: #ffffff;
        --npr-roll-bg: #0f1115;
        --npr-keyboard-bg: #1a1d24;
        --npr-key-white: #f5f5f5;
        --npr-key-black: #0a0c10;
        --npr-key-border: #333;
        --npr-error-bg: rgba(239, 68, 68, 0.12);
        --npr-error-border: rgba(239, 68, 68, 0.35);
        --npr-error-text: #f87171;
        --npr-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 12px rgba(0, 0, 0, 0.25);
        --npr-radius: 8px;
        --npr-radius-sm: 6px;
        --npr-radius-lg: 12px;
        --npr-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
        --npr-mono: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", Menlo, monospace;
        --npr-header-h: 56px;
        --npr-sidebar-w: 280px;

        box-sizing: border-box;
        width: 100%;
        background: var(--npr-bg);
        color: var(--npr-text);
        font-family: var(--npr-font);
        font-size: 14px;
        line-height: 1.5;
        border: 1px solid var(--npr-border);
        border-radius: var(--npr-radius);
        overflow: hidden;
}

.npr-viewer.npr-theme-light {
        --npr-bg: #fafafa;
        --npr-surface: #ffffff;
        --npr-surface-2: #f1f3f5;
        --npr-border: #e0e3e8;
        --npr-text: #1f2937;
        --npr-text-muted: #6b7280;
        --npr-primary: #d97706;
        --npr-primary-hover: #b45309;
        --npr-accent: #dc2626;
        --npr-sheet-bg: #ffffff;
        --npr-roll-bg: #f8f9fb;
        --npr-keyboard-bg: #e9ecef;
        --npr-key-white: #ffffff;
        --npr-key-black: #1f2937;
        --npr-key-border: #cbd5e1;
        --npr-error-bg: rgba(220, 38, 38, 0.08);
        --npr-error-border: rgba(220, 38, 38, 0.25);
        --npr-error-text: #b91c1c;
        --npr-shadow: 0 1px 2px rgba(15, 17, 21, 0.06), 0 4px 12px rgba(15, 17, 21, 0.08);
}

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

.npr-viewer__inner {
        display: flex;
        flex-direction: column;
        height: 100%;
}

/* ================================================================ */
/*  Header                                                           */
/* ================================================================ */

.npr-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 8px 16px;
        background: var(--npr-surface);
        border-bottom: 1px solid var(--npr-border);
        min-height: var(--npr-header-h);
}

.npr-header__brand {
        display: flex;
        align-items: center;
        gap: 10px;
        min-width: 0;
}

.npr-header__icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border-radius: 8px;
        background: linear-gradient(135deg, var(--npr-primary), var(--npr-accent));
        color: #fff;
        font-size: 18px;
        flex-shrink: 0;
        box-shadow: 0 1px 4px rgba(245, 158, 11, 0.35);
}

.npr-header__text {
        min-width: 0;
}

.npr-header__title {
        font-weight: 600;
        font-size: 14px;
        letter-spacing: -0.01em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
}

.npr-header__subtitle {
        font-size: 11px;
        color: var(--npr-text-muted);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
}

.npr-header__actions {
        display: flex;
        align-items: center;
        gap: 6px;
        flex-shrink: 0;
}

/* Icon button (header) */
.npr-icon-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 34px;
        padding: 0;
        background: transparent;
        border: 1px solid transparent;
        border-radius: 6px;
        color: var(--npr-text-muted);
        font-family: var(--npr-font);
        font-size: 14px;
        cursor: pointer;
        transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.npr-icon-btn:hover {
        background: var(--npr-surface-2);
        color: var(--npr-text);
        border-color: var(--npr-border);
}

.npr-icon-btn:active {
        transform: translateY(1px);
}

.npr-icon-btn--sm {
        width: 28px;
        height: 28px;
        font-size: 13px;
}

/* Download button */
.npr-download-btn {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 6px 12px;
        background: var(--npr-primary);
        color: #fff;
        border-radius: 6px;
        font-size: 13px;
        font-weight: 500;
        text-decoration: none;
        cursor: pointer;
        transition: background 0.15s;
}

.npr-download-btn:hover {
        background: var(--npr-primary-hover);
        color: #fff;
}

/* ================================================================ */
/*  Body layout                                                      */
/* ================================================================ */

.npr-body {
        display: flex;
        flex: 1;
        min-height: 0;
}

.npr-sidebar {
        width: var(--npr-sidebar-w);
        min-width: var(--npr-sidebar-w);
        padding: 12px;
        border-right: 1px solid var(--npr-border);
        background: var(--npr-surface);
        overflow-y: auto;
        max-height: 600px;
}

.npr-main {
        flex: 1;
        display: flex;
        flex-direction: column;
        min-width: 0;
        min-height: 0;
}

/* ================================================================ */
/*  Sidebar cards                                                    */
/* ================================================================ */

.npr-card {
        background: var(--npr-surface-2);
        border: 1px solid var(--npr-border);
        border-radius: var(--npr-radius);
        padding: 12px;
        margin-bottom: 12px;
}

.npr-card__title {
        font-size: 11px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: var(--npr-text-muted);
        margin-bottom: 8px;
}

.npr-card__body {
        font-size: 13px;
}

.npr-empty-piece {
        font-size: 12px;
        color: var(--npr-text-muted);
        padding: 4px 0;
}

/* Current piece card content */
.npr-piece__title {
        font-weight: 600;
        font-size: 14px;
        line-height: 1.25;
        margin-bottom: 2px;
        word-break: break-word;
}

.npr-piece__subtitle {
        font-size: 12px;
        color: var(--npr-text-muted);
        margin-bottom: 8px;
}

.npr-piece__badges {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        margin-top: 6px;
}

.npr-badge {
        display: inline-block;
        padding: 2px 8px;
        font-size: 10px;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        border-radius: 4px;
        background: var(--npr-surface);
        border: 1px solid var(--npr-border);
        color: var(--npr-text-muted);
}

.npr-badge--abc { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.npr-badge--musicxml { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.npr-badge--midi { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.npr-badge--mei { background: rgba(139, 92, 246, 0.15); color: #a78bfa; }

.npr-piece__hands-label {
        font-size: 11px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: var(--npr-text-muted);
        margin-top: 10px;
        margin-bottom: 4px;
}

.npr-piece__hands {
        display: flex;
        flex-direction: column;
        gap: 2px;
        max-height: 160px;
        overflow-y: auto;
}

.npr-hand-row {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 2px 0;
        font-size: 12px;
}

.npr-hand-row__swatch {
        display: inline-block;
        width: 12px;
        height: 12px;
        border-radius: 3px;
        flex-shrink: 0;
}

.npr-hand-row__name {
        flex: 1;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
}

.npr-hand-row__count {
        color: var(--npr-text-muted);
        font-family: var(--npr-mono);
        font-size: 11px;
}

/* ================================================================ */
/*  Samples                                                          */
/* ================================================================ */

.npr-samples {
        display: flex;
        flex-direction: column;
        gap: 6px;
}

.npr-sample {
        display: block;
        width: 100%;
        padding: 8px 10px;
        background: var(--npr-surface);
        border: 1px solid var(--npr-border);
        border-radius: 6px;
        color: var(--npr-text);
        text-align: left;
        cursor: pointer;
        transition: border-color 0.15s, background 0.15s, transform 0.05s;
        font-family: var(--npr-font);
}

.npr-sample:hover {
        border-color: var(--npr-primary);
        background: rgba(245, 158, 11, 0.08);
}

.npr-sample:active {
        transform: scale(0.99);
}

.npr-sample--active {
        border-color: var(--npr-primary);
        background: rgba(245, 158, 11, 0.12);
}

.npr-sample__title {
        font-weight: 600;
        font-size: 13px;
}

.npr-sample__composer {
        font-size: 11px;
        color: var(--npr-text-muted);
}

.npr-sample__desc {
        font-size: 11px;
        color: var(--npr-text-muted);
        margin-top: 2px;
        opacity: 0.8;
}

/* ================================================================ */
/*  Upload                                                           */
/* ================================================================ */

.npr-upload__zone {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 20px 12px;
        border: 2px dashed var(--npr-border);
        border-radius: 6px;
        cursor: pointer;
        font-size: 12px;
        color: var(--npr-text-muted);
        text-align: center;
        transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.npr-upload__zone:hover,
.npr-upload__zone--drag {
        border-color: var(--npr-primary);
        background: rgba(245, 158, 11, 0.08);
        color: var(--npr-text);
}

.npr-upload__icon {
        font-size: 24px;
        line-height: 1;
}

.npr-upload__text {
        font-size: 13px;
        font-weight: 500;
        color: var(--npr-text);
}

.npr-upload__hint {
        font-size: 10px;
        color: var(--npr-text-muted);
}

.npr-upload--loading .npr-upload__icon {
        animation: npr-spin 0.8s linear infinite;
}

@keyframes npr-spin {
        from { transform: rotate(0deg); }
        to   { transform: rotate(360deg); }
}

/* "Choose from Media Library" button — sits below the dropzone */
.npr-btn--media {
        width: 100%;
        margin-top: 8px;
        gap: 6px;
        font-size: 12px;
}

.npr-btn--media:hover {
        border-color: var(--npr-primary);
        color: var(--npr-primary);
}

/* ================================================================ */
/*  ABC input                                                        */
/* ================================================================ */

.npr-abc-input {
        width: 100%;
        padding: 8px 10px;
        background: var(--npr-bg);
        border: 1px solid var(--npr-border);
        border-radius: 6px;
        color: var(--npr-text);
        font-family: var(--npr-mono);
        font-size: 11px;
        line-height: 1.4;
        resize: vertical;
        margin-bottom: 8px;
}

.npr-abc-input:focus {
        outline: none;
        border-color: var(--npr-primary);
}

.npr-abc-input::placeholder {
        color: var(--npr-text-muted);
        opacity: 0.6;
}

/* ================================================================ */
/*  Buttons                                                          */
/* ================================================================ */

.npr-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 6px 14px;
        border: 1px solid var(--npr-border);
        border-radius: 6px;
        background: var(--npr-surface-2);
        color: var(--npr-text);
        font-family: var(--npr-font);
        font-size: 13px;
        font-weight: 500;
        cursor: pointer;
        transition: background 0.15s, border-color 0.15s, transform 0.05s;
        line-height: 1;
}

.npr-btn:hover {
        background: var(--npr-border);
}

.npr-btn:active {
        transform: translateY(1px);
}

.npr-btn--primary {
        background: var(--npr-primary);
        border-color: var(--npr-primary);
        color: #fff;
        width: 100%;
}

.npr-btn--primary:hover {
        background: var(--npr-primary-hover);
        border-color: var(--npr-primary-hover);
}

.npr-btn--icon {
        width: 34px;
        height: 34px;
        padding: 0;
        font-size: 16px;
}

.npr-btn--play {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: var(--npr-primary);
        border-color: var(--npr-primary);
        color: #fff;
        font-size: 16px;
}

.npr-btn--play:hover {
        background: var(--npr-primary-hover);
}

.npr-btn--play.npr-btn--playing {
        background: var(--npr-accent);
        border-color: var(--npr-accent);
}

.npr-btn--loop.npr-btn--loop-active {
        background: var(--npr-primary);
        border-color: var(--npr-primary);
        color: #fff;
}

/* ================================================================ */
/*  Tabs                                                             */
/* ================================================================ */

.npr-tabs {
        display: flex;
        align-items: center;
        gap: 4px;
        padding: 8px 12px 0;
        background: var(--npr-surface);
        border-bottom: 1px solid var(--npr-border);
}

.npr-tab {
        padding: 6px 14px;
        background: transparent;
        border: 1px solid transparent;
        border-bottom: none;
        border-radius: 6px 6px 0 0;
        color: var(--npr-text-muted);
        font-size: 12px;
        font-weight: 500;
        cursor: pointer;
        transition: background 0.15s, color 0.15s;
        font-family: var(--npr-font);
}

.npr-tab:hover {
        background: var(--npr-surface-2);
        color: var(--npr-text);
}

.npr-tab--active {
        background: var(--npr-bg);
        color: var(--npr-primary);
        border-color: var(--npr-border);
        border-bottom: 1px solid var(--npr-bg);
        margin-bottom: -1px;
}

.npr-tabs__spacer {
        flex: 1;
}

.npr-tabs__sample-hint {
        font-size: 11px;
        color: var(--npr-text-muted);
        padding: 6px 12px 6px 0;
}

/* ================================================================ */
/*  Views                                                            */
/* ================================================================ */

.npr-views {
        flex: 1;
        position: relative;
        min-height: 300px;
        overflow: hidden;
        background: var(--npr-bg);
}

.npr-view {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        overflow: auto;
}

.npr-view[hidden] {
        display: none;
}

.npr-view--sheet {
        background: var(--npr-sheet-bg);
        padding: 12px;
        width: 100%;
        height: 100%;
}

.npr-view--roll {
        background: var(--npr-roll-bg);
        padding: 8px;
}

.npr-view--roll canvas {
        display: block;
        width: 100%;
        height: 100%;
        min-height: 320px;
        cursor: pointer;
        touch-action: none;
}

.npr-view--split {
        display: flex;
        flex-direction: column;
        padding: 0;
        background: var(--npr-bg);
}

.npr-split-pane {
        overflow: auto;
}

.npr-split-pane--top {
        height: 55%;
        min-height: 100px;
        background: var(--npr-sheet-bg);
        padding: 12px;
}

.npr-split-pane--bottom {
        flex: 1;
        min-height: 100px;
        background: var(--npr-roll-bg);
        padding: 8px;
}

.npr-split-pane--bottom canvas {
        display: block;
        width: 100%;
        height: 100%;
        min-height: 200px;
        cursor: pointer;
        touch-action: none;
}

.npr-split-handle {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 10px;
        background: var(--npr-border);
        cursor: ns-resize;
        color: var(--npr-text-muted);
        font-size: 14px;
        user-select: none;
        flex-shrink: 0;
        position: relative;
}

.npr-split-handle__grip {
        display: inline-block;
        font-size: 12px;
        letter-spacing: 2px;
        opacity: 0.6;
}

.npr-split-handle:hover,
.npr-split-handle--dragging {
        background: var(--npr-primary);
        color: #fff;
}

.npr-split-handle--dragging .npr-split-handle__grip {
        opacity: 1;
}

/* ================================================================ */
/*  Sheet music host                                                 */
/* ================================================================ */

.npr-sheet-host {
        width: 100%;
        min-height: 120px;
}

.npr-sheet-host svg {
        max-width: 100%;
        height: auto;
}

/* Click-to-seek: hover affordance on Verovio measures */
.sheet-music-host g.measure,
.npr-sheet-host g.measure {
        cursor: pointer;
}

.sheet-music-host g.measure:hover,
.npr-sheet-host g.measure:hover {
        outline: 2px solid rgba(251, 191, 36, 0.55);
        outline-offset: -2px;
}

/* ================================================================ */
/*  Empty state                                                      */
/* ================================================================ */

.npr-empty {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 100%;
        min-height: 280px;
        text-align: center;
        color: var(--npr-text-muted);
}

.npr-empty__icon {
        font-size: 48px;
        margin-bottom: 12px;
        opacity: 0.4;
}

.npr-empty__title {
        font-size: 16px;
        font-weight: 600;
        color: var(--npr-text);
        margin-bottom: 4px;
}

.npr-empty__hint {
        font-size: 13px;
        max-width: 320px;
}

/* ================================================================ */
/*  Transport bar                                                    */
/* ================================================================ */

.npr-transport {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 12px 20px;
        padding: 10px 16px;
        background: var(--npr-surface);
        border-top: 1px solid var(--npr-border);
}

.npr-transport__buttons {
        display: flex;
        align-items: center;
        gap: 4px;
}

.npr-transport__seek {
        display: flex;
        align-items: center;
        gap: 8px;
        flex: 1;
        min-width: 200px;
}

.npr-transport__controls {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 12px 16px;
}

.npr-time {
        font-family: var(--npr-mono);
        font-size: 11px;
        color: var(--npr-text-muted);
        min-width: 36px;
        text-align: center;
}

.npr-seek {
        flex: 1;
        height: 4px;
        -webkit-appearance: none;
        appearance: none;
        background: var(--npr-surface-2);
        border-radius: 2px;
        cursor: pointer;
}

.npr-seek::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 14px;
        height: 14px;
        border-radius: 50%;
        background: var(--npr-primary);
        cursor: pointer;
        border: 2px solid var(--npr-bg);
}

.npr-seek::-moz-range-thumb {
        width: 14px;
        height: 14px;
        border-radius: 50%;
        background: var(--npr-primary);
        cursor: pointer;
        border: 2px solid var(--npr-bg);
}

.npr-control {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 11px;
        color: var(--npr-text-muted);
}

.npr-control > span:first-child {
        white-space: nowrap;
}

.npr-control__value {
        min-width: 28px;
        font-family: var(--npr-mono);
        color: var(--npr-text);
}

.npr-slider {
        width: 80px;
        height: 4px;
        -webkit-appearance: none;
        appearance: none;
        background: var(--npr-surface-2);
        border-radius: 2px;
        cursor: pointer;
}

.npr-slider::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 12px;
        height: 12px;
        border-radius: 50%;
        background: var(--npr-text);
        cursor: pointer;
}

.npr-slider::-moz-range-thumb {
        width: 12px;
        height: 12px;
        border-radius: 50%;
        background: var(--npr-text);
        cursor: pointer;
        border: none;
}

.npr-control--select {
        position: relative;
}

.npr-select {
        padding: 4px 8px;
        background: var(--npr-surface-2);
        border: 1px solid var(--npr-border);
        border-radius: 4px;
        color: var(--npr-text);
        font-size: 12px;
        font-family: var(--npr-font);
        cursor: pointer;
        max-width: 180px;
}

.npr-select:focus {
        outline: none;
        border-color: var(--npr-primary);
}

/* ---- Measure range + loop ---- */
.npr-control--measures {
        gap: 4px;
}

.npr-measure-input {
        width: 50px;
        min-width: 50px;
        padding: 2px 4px;
        background: var(--npr-surface-2);
        border: 1px solid var(--npr-border);
        border-radius: 4px;
        color: var(--npr-text);
        font-size: 11px;
        text-align: center;
}

.npr-btn--loop {
        font-size: 16px;
}

/* ================================================================ */
/*  Sheet music cursor + note highlighting                          */
/* ================================================================ */

.npr-sheet-cursor {
        position: absolute;
        z-index: 10;
        pointer-events: none;
        background: rgba(251, 191, 36, 0.25);
        border-left: 2px solid #fbbf24;
        border-right: 2px solid #fbbf24;
        box-shadow: 0 0 12px rgba(251, 191, 36, 0.6);
        opacity: 0;
        left: 0;
        top: 0;
        width: 0;
        height: 0;
        transition: left 0.08s linear, top 0.08s linear;
}

/* Active notes change color during playback */
.npr-note-active {
        fill: #fbbf24 !important;
}
.npr-note-active ellipse,
.npr-note-active path,
.npr-note-active rect {
        fill: #fbbf24 !important;
}
/* abcjs note groups */
g.npr-note-active > * {
        fill: #fbbf24 !important;
        stroke: #d97706 !important;
}
/* OSMD VF notes */
.vf-note.npr-note-active,
.vf-note.npr-note-active path,
.vf-note.npr-note-active ellipse {
        fill: #fbbf24 !important;
}
/* Verovio notes */
g.note.npr-note-active,
g.note.npr-note-active path,
g.note.npr-note-active use {
        fill: #fbbf24 !important;
        color: #fbbf24 !important;
}
/* MIDI custom SVG notes */
g.midi-note.npr-note-active ellipse {
        fill: #fbbf24 !important;
        stroke: #d97706 !important;
}
g.midi-note.npr-note-active line {
        stroke: #fbbf24 !important;
}

/* ================================================================ */
/*  Toasts                                                           */
/* ================================================================ */

.npr-toasts {
        position: absolute;
        bottom: 16px;
        right: 16px;
        z-index: 1000;
        display: flex;
        flex-direction: column-reverse;
        gap: 8px;
        pointer-events: none;
        max-width: 360px;
}

.npr-toast {
        pointer-events: auto;
        padding: 10px 14px;
        background: var(--npr-surface-2);
        border: 1px solid var(--npr-border);
        border-radius: 8px;
        color: var(--npr-text);
        font-size: 13px;
        box-shadow: var(--npr-shadow);
        opacity: 0;
        transform: translateY(8px);
        transition: opacity 0.2s ease, transform 0.2s ease;
        display: flex;
        align-items: flex-start;
        gap: 8px;
}

.npr-toast--visible {
        opacity: 1;
        transform: translateY(0);
}

.npr-toast--error {
        background: var(--npr-error-bg);
        border-color: var(--npr-error-border);
        color: var(--npr-error-text);
}

.npr-toast--success {
        border-color: rgba(16, 185, 129, 0.4);
        color: #10b981;
}

.npr-toast__close {
        background: transparent;
        border: none;
        color: inherit;
        opacity: 0.6;
        cursor: pointer;
        font-size: 16px;
        line-height: 1;
        padding: 0 0 0 4px;
        margin-left: auto;
}

.npr-toast__close:hover {
        opacity: 1;
}

/* ================================================================ */
/*  Editor-only tweaks                                               */
/* ================================================================ */

.npr-viewer--editor .npr-sidebar {
        max-height: none;
}

/* ================================================================ */
/*  Fullscreen mode                                                  */
/* ================================================================ */

.npr-viewer.npr-is-fullscreen {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw !important;
        height: 100vh !important;
        border-radius: 0;
        border: none;
        z-index: 2147483000;
}

.npr-viewer.npr-is-fullscreen .npr-viewer__inner {
        height: 100vh;
}

/* ================================================================ */
/*  Responsive                                                       */
/* ================================================================ */

@media ( max-width: 768px ) {
        .npr-body {
                flex-direction: column;
        }

        .npr-sidebar {
                width: 100%;
                min-width: 0;
                max-height: 320px;
                border-right: none;
                border-bottom: 1px solid var(--npr-border);
        }

        .npr-transport {
                padding: 10px 12px;
                gap: 8px 12px;
        }

        .npr-transport__controls {
                width: 100%;
                justify-content: space-between;
        }

        .npr-control {
                font-size: 10px;
        }

        .npr-slider {
                width: 60px;
        }

        .npr-select {
                max-width: 140px;
        }

        .npr-header {
                flex-wrap: wrap;
        }

        .npr-header__subtitle {
                display: none;
        }

        .npr-tabs__sample-hint {
                display: none;
        }
}

@media ( max-width: 480px ) {
        .npr-sidebar {
                padding: 8px;
        }

        .npr-transport__buttons {
                order: 1;
        }

        .npr-transport__seek {
                order: 3;
                width: 100%;
                flex-basis: 100%;
        }

        .npr-transport__controls {
                order: 2;
        }

        .npr-header__actions {
                gap: 2px;
        }

        .npr-icon-btn {
                width: 30px;
                height: 30px;
        }

        .npr-download-btn {
                padding: 6px 10px;
                font-size: 12px;
        }
}
