/*
 * dj4xol Theme - Shared styling for panels, layout, and typography
 * This file provides the foundation for a consistent look across all pages
 */

/* ============================================
   CSS Custom Properties (Theme Variables)
   ============================================ */
:root {
    /* Primary colours */
    --theme-bg: #f5f5f5;
    --theme-text: #333;
    --theme-accent: #2a5a8a;
    --theme-accent-hover: #3a6a9a;

    /* Panel colours */
    --panel-header-bg: #e0e0e0;
    --panel-header-text: #333;
    --panel-border: #808080;
    --panel-content-bg: #fff;
    --panel-content-border: #808080;

    /* Title bar */
    --titlebar-bg: #333;
    --titlebar-text: #fff;
    --titlebar-link: #8cf;

    /* Status colours */
    --status-positive: #8f8;
    --status-warning: #ff8;
    --status-negative: #f88;

    /* Toggle icon */
    --toggle-colour: #666;

    /* Spacing */
    --panel-padding: 10px;
    --panel-gap: 8px;
    --border-radius: 12px;
}

/* ============================================
   Base Typography
   ============================================ */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--theme-text);
    background: var(--theme-bg);
    margin: 0;
    padding: 0;
}

.site-copyright {
    padding: 8px 12px 12px;
    color: var(--toggle-colour);
    font-size: 0.85rem;
    text-align: center;
}

.site-copyright.site-copyright-app,
.site-copyright.site-copyright-game {
    padding: 0 8px 4px;
    font-size: 0.72rem;
    line-height: 1.1;
}

a {
    color: var(--theme-accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

a.admin-only-link {
    color: var(--status-negative) !important;
    font-weight: bold;
}

label {
    margin-top: 1em;
}

.classic .order-param-hint,
body:not(.lcars):not(.win95):not(.retro):not(.haxxor) .order-param-hint {
    font-size: 0.8em;
}

.warp-value.warp-wormhole {
    color: rgba(186, 112, 255, 0.95);
}

/* ============================================
   Title Bar
   ============================================ */
.title-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 8px 12px;
    background: var(--titlebar-bg);
    color: var(--titlebar-text);
    flex-shrink: 0;
    min-width: 0;
    position: relative;
    z-index: 200;
}

.title-bar .title {
    font-weight: bold;
    font-size: 1.2em;
}

.title-bar .year {
    color: #aaa;
}

.title-bar .turn-status {
    flex: 1;
    white-space: nowrap;
    min-width: 0;
}

.title-bar .title,
.title-bar .year,
.title-bar .tagline {
    min-width: 0;
}

.title-bar a {
    color: var(--titlebar-link);
}

.title-bar button {
    padding: 4px 12px;
    cursor: pointer;
}

.title-bar .status-done {
    color: var(--status-positive);
}

.title-bar .status-due {
    color: var(--status-negative);
    font-weight: bold;
}

.title-bar .status-generating {
    color: var(--status-warning);
    font-style: italic;
}

/* ============================================
   Panel System
   ============================================ */

/* Panel header (h2 inside panel) */
.panel > h2 {
    margin-top: var(--panel-gap);
    margin-bottom: 0;
    padding: 8px;
    border: 1px solid var(--panel-border);
    border-bottom: none;
    background-color: var(--panel-header-bg);
    color: var(--panel-header-text);
    border-top-right-radius: var(--border-radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    font-size: 1em;
    font-weight: bold;
    width: 100%;
    box-sizing: border-box;
}

.panel {
    width: 100%;
}

/* Panel toggle button (+/-) */
.panel-toggle {
    width: 20px;
    height: 20px;
    position: relative;
    flex-shrink: 0;
}

.panel-toggle::before,
.panel-toggle::after {
    content: '';
    position: absolute;
    background: var(--toggle-colour);
    transition: transform 0.3s ease;
}

/* Horizontal bar (always visible) */
.panel-toggle::before {
    width: 14px;
    height: 2px;
    top: 9px;
    left: 3px;
}

/* Vertical bar (collapses to 0 when open) */
.panel-toggle::after {
    width: 2px;
    height: 14px;
    top: 3px;
    left: 9px;
}

/* When panel is open, vertical bar shrinks */
.panel.open .panel-toggle::after {
    transform: scaleY(0) rotate(90deg);
}

/* Prevent transition on page load */
.panel.no-transition .panel-toggle::before,
.panel.no-transition .panel-toggle::after {
    transition: none;
}

/* Panel content wrapper */
.panel-content {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--panel-content-border);
    border-top: none;
    background: var(--panel-content-bg);
    padding: var(--panel-padding);
    box-sizing: border-box;
    padding-top: 4px;
    padding-bottom: 4px;
}

/* Reusable panel layout utilities for explicit scroll/footer composition. */
.panel-stack {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.panel-scrollable-list,
.panel-scrollable-text {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 0 5px;
    box-sizing: border-box;
}

.panel-scroll-frame {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    box-sizing: border-box;
}

.panel-scroll-frame > .panel-scrollable-list,
.panel-scroll-frame > .panel-scrollable-text {
    flex: 1 1 auto;
    min-height: 0;
}

.panel-footer,
.panel-footer-form {
    flex-shrink: 0;
    margin: 8px;
}

.panel-footer {
    padding: 8px;
    box-sizing: border-box;
}

/* Starmap panel has no padding */
.panel[data-panel="starmap"] .panel-content {
    padding: 0;
    border: none;
    background: transparent;
}

.panel:not(.open) .panel-content {
    display: none;
}

/* When panel is closed, don't take up flex space */
.panel:not(.open) {
    flex: 0 0 auto !important;
}

.panel:not(.open) > h2 {
    border-bottom: 1px solid var(--panel-border);
}

.panel .research-detail-body hr.detail-divider {
    border: none;
    height: 1px;
    background: var(--panel-border);
    margin: 10px 0;
}

body:not(.lcars):not(.win95):not(.retro):not(.haxxor) .detail-header {
    border: 1px solid var(--panel-border);
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.02));
    padding-left: 0;
}

body:not(.lcars):not(.win95):not(.retro):not(.haxxor) .detail-header.detail-header-unexplored {
    padding-left: 10px;
}

/* Long-press thumbnail pop overlay (renders above panel clipping). */
.thumb-pop-target {
    touch-action: manipulation;
    cursor: zoom-in;
}

.thumb-pop-overlay {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    margin: 0;
    transform: none !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

/* ============================================
   Hamburger Menu
   ============================================ */
.nav-menu {
    margin-left: auto;
    position: relative;
    z-index: 201;
}

.hamburger {
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    box-sizing: border-box;
    position: relative;
}

.hamburger span {
    position: absolute;
    left: 2px;
    width: 24px;
    height: 3px;
    background-color: #fff;
    border-radius: 1px;
    transition: transform 0.2s ease, opacity 0.2s ease, top 0.2s ease;
}

.hamburger span:nth-child(1) {
    top: 5px;
}

.hamburger span:nth-child(2) {
    top: 12px;
}

.hamburger span:nth-child(3) {
    top: 19px;
}

.hamburger.open span:nth-child(1) {
    top: 12px;
    transform: rotate(45deg);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    top: 12px;
    transform: rotate(-45deg);
}

.nav-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: #444;
    border: 1px solid #666;
    border-radius: 4px;
    min-width: 120px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.nav-dropdown.open {
    display: block;
}

.nav-dropdown a {
    display: block;
    padding: 10px 16px;
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid #555;
}

.nav-dropdown a:last-child {
    border-bottom: none;
}

.nav-dropdown a:hover {
    background: #555;
}

.nav-dropdown a.nav-link-game {
    color: #9fe3ff;
    font-weight: 600;
}

/* Subtle label emphasis for Classic theme detail rows. */
.classic .env-label,
body:not(.lcars):not(.win95):not(.retro):not(.haxxor) .env-label {
    color: #5f6d7a;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* ============================================
   Column Layout System
   ============================================ */
.columns {
    display: grid;
    gap: 0 10px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0 10px 10px 10px;
    position: relative;
}

/* Single column layout (default for simple pages) */
.columns.single-column {
    grid-template-columns: minmax(324px, 600px);
    justify-content: center;
}

/* Two column layout */
.columns.two-column {
    grid-template-columns: minmax(auto, 600px) minmax(324px, 1fr);
}

@media (max-width: 900px),
       ((max-width: 1200px) and (orientation: portrait) and
        (hover: none) and (pointer: coarse)) {
    html, body {
        font-size: 20px;
        overflow-x: hidden;
        touch-action: manipulation;
        -webkit-touch-callout: none;
    }

    .columns {
        display: flex;
        flex-direction: column;
        grid-template-columns: 1fr;
        gap: 0;
        padding: 0 0 12px 0;
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }

    .columns.single-column,
    .columns.two-column {
        grid-template-columns: 1fr !important;
        justify-content: stretch;
        width: 100%;
        max-width: 100%;
    }

    .column,
    .panel,
    .panel-content {
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }

    .panel {
        margin: 6px 0;
    }

    .column {
        height: fit-content;
        align-self: stretch;
    }

    .column-left,
    .column-right {
        min-width: 0;
        max-width: 100%;
        height: fit-content;
        align-self: stretch;
    }

    .title-bar {
        font-size: 1em;
        flex-wrap: nowrap;
        gap: 8px;
        min-width: 0;
    }

    .title-bar .title,
    .title-bar .year,
    .title-bar .tagline,
    .title-bar .turn-status {
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .title-bar .turn-status {
        flex: 1 1 auto;
    }

    body:not(.win95) .title-bar .year-prefix,
    body:not(.win95) .title-bar .turn-prefix {
        display: none;
    }

    body.home-page .title-bar .tagline,
    body.profile-page .title-bar .tagline {
        display: none;
    }

    body.home-page .title-bar .title,
    body.profile-page .title-bar .title {
        flex: 1 1 auto;
    }

    .nav-menu {
        position: relative;
        margin-left: auto;
        flex: 0 0 auto;
    }

    body,
    .title-bar,
    .panel,
    .columns,
    .column {
        -webkit-user-select: none;
        user-select: none;
    }

    input,
    textarea,
    select,
    option {
        -webkit-user-select: text;
        user-select: text;
    }

    .panel-content,
    .panel-content * {
        -webkit-user-select: none;
        user-select: none;
    }

    .panel-content input,
    .panel-content textarea,
    .panel-content select,
    .panel-content option {
        -webkit-user-select: text;
        user-select: text;
    }
}

@media (min-width: 641px) and (max-width: 900px) {
    .columns {
        padding-left: 8px;
        padding-right: 8px;
    }
}

/* Flex column container */
.column {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

/* Panel within a column */
.column > .panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Shared +/- stepper for numeric inputs */
.number-stepper {
    display: inline-flex;
    align-items: stretch;
    gap: 0;
    vertical-align: middle;
    max-width: 100%;
}

.number-stepper-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2em;
    padding: 0 0.6em;
    box-sizing: border-box;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

.number-stepper-btn:disabled {
    cursor: default;
    opacity: 0.45;
}

.number-stepper-input {
    margin: 0;
    min-width: 0;
    text-align: center;
    box-sizing: border-box;
}

.number-stepper .number-stepper-input::-webkit-outer-spin-button,
.number-stepper .number-stepper-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.number-stepper .number-stepper-input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.number-stepper .number-stepper-input:focus {
    position: relative;
    z-index: 1;
}

body:not(.lcars):not(.win95):not(.retro):not(.haxxor) .number-stepper-btn {
    border: 1px solid var(--panel-border);
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.18), rgba(0, 0, 0, 0.04));
    color: var(--theme-text);
}

body:not(.lcars):not(.win95):not(.retro):not(.haxxor) .number-stepper-btn--minus {
    border-right: none;
    border-radius: 4px 0 0 4px;
}

body:not(.lcars):not(.win95):not(.retro):not(.haxxor) .number-stepper-btn--plus {
    border-left: none;
    border-radius: 0 4px 4px 0;
}

body:not(.lcars):not(.win95):not(.retro):not(.haxxor) .number-stepper-input {
    border-radius: 0;
}

/* ============================================
   Utility Classes
   ============================================ */
.text-muted {
    color: #888;
}

.text-positive {
    color: var(--status-positive);
}

.text-warning {
    color: var(--status-warning);
}

.text-negative {
    color: var(--status-negative);
}

.no-items {
    color: #888;
    font-style: italic;
}

/* ============================================
   Inline Message Banners
   ============================================ */
.form-message-banner {
    position: fixed;
    top: 56px;
    left: 10px;
    right: 10px;
    z-index: 250;
    box-sizing: border-box;
    margin: 0;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: #2a5a8a;
    color: #fff;
    border-radius: 8px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
    max-height: 40vh;
    overflow-y: auto;
    opacity: 1;
    transition: opacity 0.25s ease;
    cursor: pointer;
}

.form-message-banner.is-dismissing {
    opacity: 0;
}

.form-message-banner.form-message-banner-error {
    background: #8a2a2a;
}

.form-message-banner p {
    margin: 0;
    font-weight: bold;
}

/* ============================================
   Form Errors
   ============================================ */
.form-errors,
.errorlist {
    color: #cc3333;
}

.errorlist {
    list-style: none;
    margin: 4px 0 0 0;
    padding: 0;
    font-weight: bold;
}

/* ============================================
   Navigation Buttons
   ============================================ */
.nav-button {
    border: 1px solid #666;
    background: #333;
    color: #fff;
    padding: 6px 12px;
    cursor: pointer;
}

.nav-button.primary {
    background: #444;
    border-color: #555;
}

/* ============================================
   Habitability UI
   ============================================ */
.habitability-ui {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.habitability-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 0.85em;
}

.habitability-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding-right: 10px;
    border-right: 1px solid #aaa;
}

.habitability-group:last-child {
    border-right: none;
    padding-right: 0;
}

.habitability-value {
    min-width: 32px;
    text-align: right;
    font-weight: bold;
}

.habitability-button {
    padding: 2px 6px;
    border: 1px solid #666;
    background: #eee;
    cursor: pointer;
    font-weight: bold;
}

.habitability-points {
    font-size: 0.85em;
    color: #b34700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.habitability-summary th {
    text-align: left;
}

.habitability-total {
    font-weight: bold;
}

.habitability-total.over-budget {
    color: #cc3333;
}

.habitability-errors {
    margin-bottom: 6px;
}

.habitability-range {
    color: #666;
    font-size: 0.85em;
}

/* Environmental bars (for habitability editor) */
.env-bar {
    flex: 1;
    height: 12px;
    background: linear-gradient(to right,
        #400000 0%,
        #00ff00 50%,
        #400000 100%);
    border: 1px solid #404040;
    position: relative;
    margin: 0 8px 0 0;
}

.env-range {
    position: absolute;
    top: 1px;
    bottom: 1px;
    background: rgba(0, 170, 0, 0.25);
    border: 1px solid #00aa00;
    clip-path: polygon(0 50%, 6px 0, calc(100% - 6px) 0, 100% 50%, calc(100% - 6px) 100%, 6px 100%);
}

.env-marker {
    position: absolute;
    top: 50%;
    width: 8px;
    height: 8px;
    background-color: #ffffff;
    border: 1px solid #000000;
    transform: translate(-50%, -50%) rotate(45deg);
}

.env-marker.habitable {
    background-color: #00ff00;
}

/* Hide raw habitability inputs when Brython is active */
.brython .habitability-field {
    display: none;
}

/* ============================================
   Theme Selector
   ============================================ */
.theme-selector {
    display: flex;
    gap: 15px;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    padding: 2px 2px 12px 2px;
    cursor: grab;
}

.theme-selector-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px 8px 12px 8px;
    overflow: hidden;
}

.theme-selector-frame {
    position: relative;
    overflow: hidden;
    min-height: 118px;
}

.theme-selector-frame.theme-selector-frame--custom {
    padding-bottom: 24px;
}

.theme-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border: 3px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
    background: #fafafa;
    flex: 0 0 auto;
    min-width: 132px;
    margin-bottom: 2px;
}

.theme-option:hover {
    border-color: #999;
    background: #f0f0f0;
}

.theme-option.selected {
    border-color: var(--theme-accent);
    background: #e8f4fc;
}

.theme-preview {
    width: 100px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #ccc;
}

.theme-preview.classic {
    background: linear-gradient(to bottom, #333 30%, #e0e0e0 30%);
}

.theme-preview.lcars {
    background: #000;
    position: relative;
    overflow: hidden;
}

/* Title bar: orange with mauve corner */
.theme-preview.lcars::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 12px;
    background: linear-gradient(to right,
        #cc6633 0%, #cc6633 calc(100% - 22px),
        #000 calc(100% - 22px), #000 calc(100% - 18px),
        #cc99cc calc(100% - 18px), #cc99cc 100%);
}

/* Panel: header bar + gap + content with rounded bottom-left */
.theme-preview.lcars::after {
    content: '';
    position: absolute;
    top: 18px;
    left: 6px;
    right: 6px;
    bottom: 6px;
    background: linear-gradient(to bottom,
        #9999cc 0%, #9999cc 10px,
        #000 10px, #000 14px,
        transparent 14px);
    border: 2px solid #cc6633;
    border-top: none;
    border-radius: 0 0 0 10px;
}

.theme-preview.win95 {
    background: #008080;
    position: relative;
}

.theme-preview.win95::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 6px;
    right: 6px;
    height: 16px;
    background: linear-gradient(to right, #000080, #1084d0);
}

.theme-preview.win95::after {
    content: '';
    position: absolute;
    top: 22px;
    left: 6px;
    right: 6px;
    bottom: 6px;
    background: #c0c0c0;
    box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #000000;
}

.theme-preview.haxxor {
    background:
        radial-gradient(circle at 18% 28%, #9bdcff 0 2px, transparent 2px),
        radial-gradient(circle at 72% 22%, #7cffb6 0 2px, transparent 2px),
        radial-gradient(circle at 58% 68%, #ffef8f 0 1px, transparent 1px),
        linear-gradient(to bottom, #08101d 0%, #04070d 100%);
    position: relative;
    border-radius: 0;
}

.theme-preview.haxxor::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 6px;
    right: 6px;
    height: 12px;
    background: #102038;
    border: 2px solid #67e4a6;
    box-shadow: inset 0 0 0 2px #08101d;
}

.theme-preview.haxxor::after {
    content: '';
    position: absolute;
    left: 16px;
    top: 28px;
    right: 16px;
    bottom: 14px;
    background:
        radial-gradient(circle at 22% 28%, #d9e4ef 0 1px, transparent 1px),
        radial-gradient(circle at 58% 42%, #67e4a6 0 1px, transparent 1px),
        radial-gradient(circle at 76% 24%, #ffef8f 0 1px, transparent 1px),
        radial-gradient(circle at 40% 70%, #67e4a6 0 1px, transparent 1px);
}

.theme-preview.retro {
    background:
        repeating-linear-gradient(0deg, #06090f 0 8px, #09111b 8px 16px),
        linear-gradient(to bottom, #0a1430 0%, #05080f 100%);
    position: relative;
    border-radius: 0;
    border: 0.35em solid #6dd3ff;
}

.theme-preview.retro::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    height: 12px;
    background: #13274c;
    border: 0.35em solid #ffd36a;
}

.theme-preview.retro::after {
    content: '';
    position: absolute;
    left: 16px;
    top: 30px;
    width: 8px;
    height: 8px;
    background: #72ffb1;
    box-shadow:
        16px 0 0 #72ffb1,
        8px 8px 0 #72ffb1,
        16px 8px 0 #72ffb1,
        24px 8px 0 #72ffb1,
        0 16px 0 #72ffb1,
        8px 16px 0 #72ffb1,
        16px 16px 0 #72ffb1,
        24px 16px 0 #72ffb1,
        8px 24px 0 #ffd36a,
        16px 24px 0 #ffd36a;
}

.theme-name {
    font-weight: 600;
    font-size: 0.9em;
    color: var(--theme-text);
}

.theme-carousel-scrollbar-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 14px;
    display: none;
    pointer-events: auto;
}

.theme-carousel-scrollbar-track,
.theme-carousel-scrollbar-thumb {
    position: absolute;
    top: 0;
    bottom: 0;
    box-sizing: border-box;
}

.theme-carousel-scrollbar-track {
    left: 0;
    right: 0;
}

.theme-carousel-scrollbar-thumb {
    left: 0;
    min-width: 28px;
    transform: translateX(0);
}

.theme-carousel-button {
    display: none;
    position: absolute;
    top: 0;
    bottom: 0;
    transform: none;
    width: 26px;
    height: auto;
    padding: 0;
    z-index: 2;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    border: none;
    box-shadow: none;
}

.theme-carousel-button--prev {
    left: 0;
}

.theme-carousel-button--next {
    right: 0;
}

.theme-selector.is-dragging {
    cursor: grabbing;
    user-select: none;
    -webkit-user-select: none;
}

.theme-selector.is-dragging .theme-option {
    pointer-events: none;
}

body.theme-carousel-dragging,
body.theme-carousel-dragging * {
    user-select: none !important;
    -webkit-user-select: none !important;
}

.classic .theme-selector-frame,
body:not(.lcars):not(.win95):not(.retro):not(.haxxor) .theme-selector-frame {
    min-height: 128px;
    padding-left: 24px;
    padding-right: 24px;
}

.classic .theme-selector-panel > p,
body:not(.lcars):not(.win95):not(.retro):not(.haxxor) .theme-selector-panel > p {
    margin: 0 0 4px 0;
}

.classic .theme-carousel-button,
body:not(.lcars):not(.win95):not(.retro):not(.haxxor) .theme-carousel-button {
    display: inline-flex;
    color: rgba(51, 51, 51, 0.7);
    background: transparent;
}

.classic .theme-carousel-button:hover:not(:disabled),
body:not(.lcars):not(.win95):not(.retro):not(.haxxor) .theme-carousel-button:hover:not(:disabled) {
    color: rgba(51, 51, 51, 0.95);
}

.classic .theme-carousel-button:disabled,
body:not(.lcars):not(.win95):not(.retro):not(.haxxor) .theme-carousel-button:disabled {
    opacity: 0.18;
    cursor: default;
}

.classic .theme-carousel-button--prev,
body:not(.lcars):not(.win95):not(.retro):not(.haxxor) .theme-carousel-button--prev {
    left: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0));
}

.classic .theme-carousel-button--next,
body:not(.lcars):not(.win95):not(.retro):not(.haxxor) .theme-carousel-button--next {
    right: 0;
    background: linear-gradient(to left, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0));
}
