/* ═══════════════════════════════════════════════════════════════════════════
   LANTERN TUI — Custom Stylesheet
   ═══════════════════════════════════════════════════════════════════════════

   DARK THEME  — Jungle Dark
   Deep forest-green-black backgrounds. Like looking at a terminal buried
   inside a rainforest at 2 AM. Backgrounds have real green in them.
   Bright jungle green accent. Warm sage-cream text.

   bg-void    #0a0f0a   screen bg   (near-black, green soul)
   bg-base    #0f1a12   panel bg    (deep forest floor)
   bg-raised  #162118   table headers, modals
   bg-ctrl    #1c2b1e   buttons, inputs
   bg-hover   #1e3323   hover
   bg-sel     #1a3d20   selection (rich jungle green)
   bg-border  #2a4030   border (visible green line)

   fg-primary #dde8d0   primary text (sage-cream)
   fg-second  #8aaa88   secondary (muted sage)
   fg-muted   #506050   muted
   fg-dim     #2e3e2e   barely visible placeholder

   green-hi   #5dba6e   bright jungle green (accent, online dot, success)
   green-mid  #3d9455   mid green (headings, hover)
   amber      #c4944a   amber (warnings)
   rose       #c26068   rose-red (errors)
   slate      #7090a0   slate (IPs, paths, sizes)

   LIGHT THEME — Everforest Light  (unchanged)
   ═══════════════════════════════════════════════════════════════════════════ */


/* ── Dark Theme (Default) ─────────────────────────────────────────────────── */

Screen {
    background: #0a0f0a;
}

Header {
    dock: top;
    height: 3;
    background: #0f1a12;
    color: #dde8d0;
    text-style: bold;
    align: center middle;
}

HeaderIcon {
    display: none;
}

Footer {
    dock: bottom;
    background: #0f1a12;
    color: #506050;
}

/* ── Main layout ── */

#main-container {
    height: 1fr;
}

/* ── Sidebar ── */

#sidebar {
    width: 40;
    border: solid #2a4030;
    background: #0f1a12;
    padding: 0 1;
}

#sidebar-title {
    color: #5dba6e;
    text-style: bold;
    padding: 1 0;
    text-align: center;
}

#peer-list-container {
    height: 1fr;
    min-height: 5;
}

#peer-list {
    height: 1fr;
    background: transparent;
    scrollbar-size: 1 1;
    scrollbar-color: #1c2b1e;
    scrollbar-color-hover: #5dba6e;
    scrollbar-color-active: #5dba6e;
}

#peer-list > ListItem {
    padding: 0 1;
    height: 3;
    background: transparent;
}

#peer-list > ListItem:hover {
    background: #1e3323;
}

#peer-list > ListItem.-highlighted {
    background: #1a3d20;
}

.peer-name {
    color: #5dba6e;
    text-style: bold;
}

.peer-addr {
    color: #7090a0;
}

.peer-dot {
    color: #5dba6e;
}

/* ── My Files section (sidebar bottom) ── */

#my-files-title {
    text-align: center;
    color: #5dba6e;
    text-style: bold;
    padding: 1 0;
    background: #0f1a12;
    margin-top: 1;
}

#my-files-table {
    height: auto;
    max-height: 12;
    background: transparent;
    margin: 0 0 1 0;
    scrollbar-size: 1 1;
    scrollbar-color: #1c2b1e;
    scrollbar-color-hover: #5dba6e;
    scrollbar-color-active: #5dba6e;
}

#my-files-table > .datatable--header {
    background: #162118;
    color: #5dba6e;
    text-style: bold;
}

#my-files-table > .datatable--cursor {
    background: #1a3d20;
    color: #dde8d0;
}

#my-files-table > .datatable--hover {
    background: #1e3323;
    color: #dde8d0;
}

#my-files-table > .datatable--odd-row {
    color: #dde8d0;
}

#my-files-table > .datatable--even-row {
    background: #111a13;
    color: #dde8d0;
}

/* ── Main panel (remote files) ── */

#main-panel {
    background: #0f1a12;
    border: solid #2a4030;
}

#files-header {
    dock: top;
    height: auto;
    padding: 1 2;
    background: #162118;
    border-bottom: heavy #2a4030;
}

#files-header-text {
    color: #dde8d0;
    text-style: bold;
}

#remote-files-table {
    height: 1fr;
    background: transparent;
    scrollbar-size: 1 1;
    scrollbar-color: #1c2b1e;
    scrollbar-color-hover: #5dba6e;
    scrollbar-color-active: #5dba6e;
}

#remote-files-table > .datatable--header {
    background: #162118;
    color: #5dba6e;
    text-style: bold;
}

#remote-files-table > .datatable--cursor {
    background: #1a3d20;
    color: #dde8d0;
}

#remote-files-table > .datatable--hover {
    background: #1e3323;
    color: #dde8d0;
}

#remote-files-table > .datatable--odd-row {
    color: #dde8d0;
}

#remote-files-table > .datatable--even-row {
    background: #111a13;
    color: #dde8d0;
}

#no-peer-label {
    width: 100%;
    height: 100%;
    content-align: center middle;
    text-align: center;
    color: #2e3e2e;
    text-style: italic;
}

/* ── Action bar ── */

#action-bar {
    dock: bottom;
    height: auto;
    align: center middle;
}

#action-bar Button {
    margin: 0 1;
    min-width: 14;
    height: 3;
    background: #1c2b1e;
    color: #8aaa88;
    text-style: bold;
    border-top: tall #2a4030;
    border-bottom: tall #0a0f0a;
}

#action-bar Button:hover {
    background: #1a3d20;
    color: #5dba6e;
    border-top: tall #3a5840;
}

#action-bar Button:focus {
    background: #1a3d20;
    color: #dde8d0;
    border-top: tall #3a5840;
}

/* ── Log panel ── */

#log-panel {
    height: 12;
    border: solid #2a4030;
    background: #0f1a12;
}

#log-title {
    dock: top;
    height: auto;
    padding: 1 0;
    color: #5dba6e;
    text-style: bold;
}

#log-view {
    height: 1fr;
    padding: 0 1;
    background: transparent;
    scrollbar-size: 1 1;
    scrollbar-color: #1c2b1e;
    scrollbar-color-hover: #5dba6e;
    scrollbar-color-active: #5dba6e;
}

/* ── Command bar ── */

#command-bar {
    height: auto;
    background: #0f1a12;
    border: solid #2a4030;
}

#command-input {
    width: 1fr;
    background: #0f1a12;
    color: #dde8d0;
    border: tall #0f1a12;
}

#command-input:focus {
    background: #162118;
    border: tall #2a4030;
}

/* ── Help modal ── */

#help-dialog {
    width: 70;
    max-width: 80%;
    height: auto;
    max-height: 80%;
    background: #0f1a12;
    border: solid #2a4030;
    padding: 1 2;
    margin: 2 4;
}

#help-title {
    color: #5dba6e;
    text-style: bold;
    text-align: center;
    padding: 1 0;
    border-bottom: heavy #2a4030;
    margin-bottom: 1;
}

#help-content {
    color: #8aaa88;
    padding: 1 1;
    height: auto;
}

#help-close-btn {
    margin-top: 1;
    width: 100%;
    background: #1c2b1e;
    color: #dde8d0;
    text-style: bold;
    border-top: tall #2a4030;
    border-bottom: tall #0a0f0a;
}

#help-close-btn:hover {
    background: #1a3d20;
    color: #5dba6e;
    border-top: tall #3a5840;
}

HelpScreen {
    align: center middle;
    background: rgba(5, 10, 5, 0.85);
}

/* ── Upload modal ── */

UploadConfirmScreen {
    align: center middle;
    background: rgba(5, 10, 5, 0.85);
}

#upload-dialog {
    width: 60;
    max-width: 75%;
    height: auto;
    background: #0f1a12;
    border: solid #2a4030;
    padding: 1 2;
    margin: 2 4;
}

#upload-title {
    color: #5dba6e;
    text-style: bold;
    text-align: center;
    padding: 1 0;
    border-bottom: heavy #2a4030;
    margin-bottom: 1;
}

#upload-confirm-info {
    width: 100%;
    color: #8aaa88;
    padding: 1 0;
    margin-bottom: 1;
}

#upload-btn-bar {
    width: 100%;
    height: auto;
    align: center middle;
}

#upload-btn-bar Button {
    margin: 0 1;
    min-width: 16;
    height: 3;
    text-style: bold;
}

#upload-confirm {
    background: #1a3d20;
    color: #5dba6e;
    border-top: tall #3a5840;
    border-bottom: tall #0a1a0c;
}

#upload-confirm:hover {
    background: #205228;
    color: #5dba6e;
    border-top: tall #4a6850;
}

#upload-cancel {
    background: #2e1c1e;
    color: #c26068;
    border-top: tall #442030;
    border-bottom: tall #1a0e10;
}

#upload-cancel:hover {
    background: #38222a;
    color: #c26068;
    border-top: tall #503040;
}

UploadScreen {
    align: center middle;
    background: rgba(5, 10, 5, 0.85);
}

/* ── Transfer Progress modal ── */

TransferProgressScreen {
    align: center middle;
    background: rgba(5, 10, 5, 0.85);
}

#btn-cancel, #btn-close {
    margin-top: 1;
    width: 100%;
    background: #2e1c1e;
    color: #c26068;
    text-style: bold;
    border-top: tall #442030;
    border-bottom: tall #1a0e10;
}

#btn-cancel:hover {
    background: #38222a;
    color: #c26068;
}

#btn-close {
    background: #1a3d20;
    color: #5dba6e;
    border-top: tall #3a5840;
    border-bottom: tall #0a1a0c;
}

#btn-close:hover {
    background: #205228;
    color: #5dba6e;
}

/* ── Loading screen ── */

LoadingScreen {
    align: center middle;
    background: #0a0f0a;
}

#loading-logo {
    color: #5dba6e;
    text-style: bold;
    text-align: center;
    content-align: center middle;
}

/* ── Progress bar ── */

#progress-bar {
    width: 1fr;
    height: 1;
    background: #1c2b1e;
    color: #5dba6e;
}

#progress-bar > .bar--bar {
    color: #5dba6e;
    background: #1a3d20;
}

#progress-bar > .bar--complete {
    color: #3d9455;
}

#transfer-status {
    color: #506050;
    text-align: center;
    height: 1;
}

/* ── File picker (textual-fspicker overrides) ── */

FileSystemPickerScreen {
    align: center middle;
    background: rgba(5, 10, 5, 0.85);
}

FileSystemPickerScreen Dialog {
    background: #0f1a12;
    border: solid #2a4030;
    border-title-color: #dde8d0;
    border-title-background: #0f1a12;
    border-subtitle-color: #c26068;
    border-subtitle-background: #2e1c1e;
}

FileSystemPickerScreen OptionList,
FileSystemPickerScreen OptionList:focus {
    background: #0f1a12;
    scrollbar-size: 1 1;
    scrollbar-color: #1c2b1e;
    scrollbar-color-hover: #5dba6e;
    scrollbar-color-active: #5dba6e;
}

FileSystemPickerScreen OptionList > .option-list--option-highlighted {
    background: #1a3d20;
    color: #dde8d0;
    text-style: bold;
}

FileSystemPickerScreen OptionList > .option-list--option-hover {
    background: #1e3323;
    color: #dde8d0;
}

FileSystemPickerScreen Button {
    background: #1c2b1e;
    color: #8aaa88;
    text-style: bold;
    border-top: tall #2a4030;
    border-bottom: tall #0a0f0a;
}

FileSystemPickerScreen Button:hover {
    background: #1a3d20;
    color: #5dba6e;
    border-top: tall #3a5840;
}

FileSystemPickerScreen Button:focus {
    background: #1a3d20;
    color: #dde8d0;
    border-top: tall #3a5840;
}

FileSystemPickerScreen DriveNavigation,
FileSystemPickerScreen DriveNavigation:focus {
    border: blank;
    border-right: solid #2a4030;
    background: #0f1a12;
}

FileSystemPickerScreen DriveNavigation > .option-list--option-highlighted {
    background: #1a3d20;
    color: #dde8d0;
    text-style: bold;
}

FileSystemPickerScreen CurrentDirectory {
    color: #7090a0;
    border-bottom: solid #2a4030;
    background: #162118;
}

FileSystemPickerScreen DirectoryNavigation > .directory-navigation--hidden {
    color: #506050;
    text-style: italic;
}

FileSystemPickerScreen Input {
    background: #0f1a12;
    color: #dde8d0;
    border: tall #1c2b1e;
}

FileSystemPickerScreen Input:focus {
    background: #162118;
    border: tall #2a4030;
}

/* ── Notification toast ── */

#notification-toast {
    dock: top;
    height: auto;
    padding: 1 2;
    margin: 1 4;
    background: #1c2b1e;
    color: #dde8d0;
    text-style: bold;
    border: solid #2a4030;
    opacity: 0;
    transition: opacity 0.3;
}

#notification-toast.visible {
    opacity: 1;
}

#notification-toast.success {
    background: #1a3d20;
    border: solid #3a5840;
    color: #5dba6e;
}

#notification-toast.error {
    background: #2e1c1e;
    border: solid #442030;
    color: #c26068;
}


/* ═══════════════════════════════════════════════════════════════════════════
   LIGHT THEME  — Everforest Light
   Warm parchment backgrounds, muted sage greens, olive accents.
   Easy on the eyes — mirrors the forest character of the dark theme.
   ═══════════════════════════════════════════════════════════════════════════ */

.app-light Screen {
    background: #f3ede3;
}

.app-light Header {
    background: #ede8d9;
    color: #5c5143;
    text-style: bold;
}

.app-light Footer {
    background: #e4dece;
    color: #9a8e7e;
}

/* ── Sidebar ── */

.app-light #sidebar {
    border: solid #bfb9a8;
    background: #ede8d9;
}

.app-light #sidebar-title {
    color: #5c5143;
}

.app-light #peer-list {
    scrollbar-color: #a8a090;
    scrollbar-color-hover: #5a8a3a;
    scrollbar-color-active: #5a8a3a;
}

.app-light #peer-list > ListItem:hover {
    background: #ddd8c8;
}

.app-light #peer-list > ListItem.-highlighted {
    background: #c8dfc0;
}

.app-light .peer-name {
    color: #3d8b7d;
}

.app-light .peer-addr {
    color: #4a6878;
}

.app-light .peer-dot {
    color: #5a8a3a;
}

/* ── My Files section ── */

.app-light #my-files-title {
    color: #5c5143;
    background: #ede8d9;
}

.app-light #my-files-table {
    scrollbar-color: #a8a090;
    scrollbar-color-hover: #5a8a3a;
    scrollbar-color-active: #5a8a3a;
}

.app-light #my-files-table > .datatable--header {
    background: #d8d1bf;
    color: #5c5143;
    text-style: bold;
}

.app-light #my-files-table > .datatable--cursor {
    background: #c8dfc0;
    color: #3a3028;
}

.app-light #my-files-table > .datatable--hover {
    background: #ddd8c8;
    color: #5c5143;
}

.app-light #my-files-table > .datatable--odd-row {
    color: #5c5143;
}

.app-light #my-files-table > .datatable--even-row {
    background: #ede8d9;
    color: #5c5143;
}

/* ── Main panel ── */

.app-light #main-panel {
    background: #ede8d9;
    border: solid #bfb9a8;
}

.app-light #files-header {
    background: #ede8d9;
    border-bottom: heavy #bfb9a8;
}

.app-light #files-header-text {
    color: #5c5143;
}

.app-light #remote-files-table {
    scrollbar-color: #a8a090;
    scrollbar-color-hover: #5a8a3a;
    scrollbar-color-active: #5a8a3a;
}

.app-light #remote-files-table > .datatable--header {
    background: #d8d1bf;
    color: #5c5143;
    text-style: bold;
}

.app-light #remote-files-table > .datatable--cursor {
    background: #c8dfc0;
    color: #3a3028;
}

.app-light #remote-files-table > .datatable--hover {
    background: #ddd8c8;
    color: #5c5143;
}

.app-light #remote-files-table > .datatable--odd-row {
    color: #5c5143;
}

.app-light #remote-files-table > .datatable--even-row {
    background: #ede8d9;
    color: #5c5143;
}

.app-light #no-peer-label {
    color: #aea090;
}

/* ── Action bar ── */

.app-light #action-bar Button {
    background: #d8d1bf;
    color: #5c5143;
    text-style: bold;
    border-top: tall #e4dece;
    border-bottom: tall #bfb9a8;
}

.app-light #action-bar Button:hover {
    background: #c8dfc0;
    color: #3a5c2a;
    border-top: tall #d8f0d0;
}

.app-light #action-bar Button:focus {
    background: #c8dfc0;
    color: #3a5c2a;
}

/* ── Log panel ── */

.app-light #log-panel {
    border: solid #bfb9a8;
    background: #ede8d9;
}

.app-light #log-title {
    color: #5c5143;
}

.app-light #log-view {
    scrollbar-color: #a8a090;
    scrollbar-color-hover: #5a8a3a;
    scrollbar-color-active: #5a8a3a;
}

/* ── Command bar ── */

.app-light #command-bar {
    background: #ede8d9;
    border: solid #bfb9a8;
}

.app-light #command-input {
    background: #f3ede3;
    color: #5c5143;
    border: tall #d8d1bf;
}

.app-light #command-input:focus {
    background: #faf6f0;
    border: tall #bfb9a8;
}

/* ── Help modal ── */

.app-light HelpScreen {
    background: rgba(100, 90, 75, 0.55);
}

.app-light #help-dialog {
    background: #ede8d9;
    border: solid #bfb9a8;
}

.app-light #help-title {
    color: #5c5143;
    border-bottom: heavy #bfb9a8;
}

.app-light #help-content {
    color: #7a6e5e;
}

.app-light #help-close-btn {
    background: #d8d1bf;
    color: #5c5143;
    border-top: tall #e4dece;
    border-bottom: tall #bfb9a8;
}

.app-light #help-close-btn:hover {
    background: #c8dfc0;
    color: #3a5c2a;
    border-top: tall #d8f0d0;
}

/* ── Upload modal ── */

.app-light UploadConfirmScreen {
    background: rgba(100, 90, 75, 0.55);
}

.app-light #upload-dialog {
    background: #ede8d9;
    border: solid #bfb9a8;
}

.app-light #upload-title {
    color: #5c5143;
    border-bottom: heavy #bfb9a8;
}

.app-light #upload-confirm-info {
    color: #5c5143;
}

.app-light #upload-confirm {
    background: #c0d8b8;
    color: #2a5220;
    border-top: tall #d0e8c8;
    border-bottom: tall #a0c098;
}

.app-light #upload-confirm:hover {
    background: #aecba6;
    color: #1e4018;
}

.app-light #upload-cancel {
    background: #dfc8c8;
    color: #7a2020;
    border-top: tall #eedad8;
    border-bottom: tall #c8a8a8;
}

.app-light #upload-cancel:hover {
    background: #d4b8b8;
    color: #621a1a;
}

.app-light UploadScreen {
    background: rgba(100, 90, 75, 0.55);
}

/* ── Transfer progress modal ── */

.app-light TransferProgressScreen {
    background: rgba(100, 90, 75, 0.55);
}

.app-light #btn-cancel {
    background: #dfc8c8;
    color: #7a2020;
    border-top: tall #eedad8;
    border-bottom: tall #c8a8a8;
}

.app-light #btn-cancel:hover {
    background: #d4b8b8;
    color: #621a1a;
}

.app-light #btn-close {
    background: #c0d8b8;
    color: #2a5220;
    border-top: tall #d0e8c8;
    border-bottom: tall #a0c098;
}

.app-light #btn-close:hover {
    background: #aecba6;
    color: #1e4018;
}

/* ── Loading screen ── */

.app-light LoadingScreen {
    background: #f3ede3;
}

.app-light #loading-logo {
    color: #5c5143;
}

/* ── Progress bar ── */

.app-light #progress-bar {
    background: #d8d1bf;
    color: #3d8b7d;
}

.app-light #progress-bar > .bar--bar {
    color: #3d8b7d;
    background: #c8dfc0;
}

.app-light #progress-bar > .bar--complete {
    color: #5a8a3a;
}

.app-light #transfer-status {
    color: #9a8e7e;
}

/* ── Notification toast ── */

.app-light #notification-toast {
    background: #ddd8c8;
    color: #5c5143;
    border: solid #bfb9a8;
}

.app-light #notification-toast.success {
    background: #c0d8b8;
    border: solid #a0c098;
    color: #2a5220;
}

.app-light #notification-toast.error {
    background: #dfc8c8;
    border: solid #c8a8a8;
    color: #7a2020;
}

/* ── File picker (textual-fspicker overrides — Everforest Light) ── */

.app-light FileSystemPickerScreen {
    align: center middle;
    background: rgba(100, 90, 75, 0.55);
}

.app-light FileSystemPickerScreen Dialog {
    background: #ede8d9;
    border: solid #bfb9a8;
    border-title-color: #5c5143;
    border-title-background: #ede8d9;
    border-subtitle-color: #7a2020;
    border-subtitle-background: #dfc8c8;
}

.app-light FileSystemPickerScreen OptionList,
.app-light FileSystemPickerScreen OptionList:focus {
    background: #ede8d9;
    scrollbar-color: #a8a090;
    scrollbar-color-hover: #5a8a3a;
    scrollbar-color-active: #5a8a3a;
}

.app-light FileSystemPickerScreen OptionList > .option-list--option-highlighted {
    background: #c8dfc0;
    color: #3a3028;
    text-style: bold;
}

.app-light FileSystemPickerScreen OptionList > .option-list--option-hover {
    background: #ddd8c8;
    color: #5c5143;
}

.app-light FileSystemPickerScreen Button {
    background: #d8d1bf;
    color: #5c5143;
    text-style: bold;
    border-top: tall #e4dece;
    border-bottom: tall #bfb9a8;
}

.app-light FileSystemPickerScreen Button:hover {
    background: #c8dfc0;
    color: #3a5c2a;
    border-top: tall #d8f0d0;
}

.app-light FileSystemPickerScreen Button:focus {
    background: #c8dfc0;
    color: #3a5c2a;
}

.app-light FileSystemPickerScreen DriveNavigation,
.app-light FileSystemPickerScreen DriveNavigation:focus {
    border: blank;
    border-right: solid #bfb9a8;
    background: #ede8d9;
}

.app-light FileSystemPickerScreen DriveNavigation > .option-list--option-highlighted {
    background: #c8dfc0;
    color: #3a3028;
    text-style: bold;
}

.app-light FileSystemPickerScreen CurrentDirectory {
    color: #4a6878;
    border-bottom: solid #bfb9a8;
    background: #e4dece;
}

.app-light FileSystemPickerScreen DirectoryNavigation > .directory-navigation--hidden {
    color: #aea090;
    text-style: italic;
}

.app-light FileSystemPickerScreen Input {
    background: #f3ede3;
    color: #5c5143;
    border: tall #d8d1bf;
}

.app-light FileSystemPickerScreen Input:focus {
    background: #faf6f0;
    border: tall #bfb9a8;
}
