/* rclone.css — replaces bootstrap.min.4.4.1.css + custom.css */

/* ===== Reset / Base ===== */
*, *::before, *::after { box-sizing: border-box; }
body {
    margin: 0;
    font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #212529;
}

/* ===== Links ===== */
a { color: #3f79ad; text-decoration: none; }
a:hover { color: #70caf2; text-decoration: underline; }

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    padding: 0;
    font-weight: 600;
    line-height: 1.3;
}
h1 { font-size: 2rem; font-weight: 700; margin-top: 1rem; }
h2 { font-size: 1.6rem; font-weight: 600; }
h3 { font-size: 1.3rem; font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }
h5 { font-size: 0.95rem; font-weight: 600; }

p { margin-top: 0; margin-bottom: 1rem; }

/* ===== Code / Pre / Blockquote ===== */
pre {
    position: relative;
    padding: 1rem;
    margin: 0 0 10.5px;
    font-size: 14px;
    line-height: 1.42857143;
    word-break: break-all;
    word-wrap: break-word;
    color: #333;
    background: #f8f9fb;
    border: 1px solid rgba(0,0,0,.1);
    border-radius: 0.5rem;
    overflow: auto;
}
.copy-btn {
    cursor: pointer;
    color: #6c757d;
    transition: color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}
.copy-btn:hover { color: #3f79ad; }
.copy-btn.copied { color: #28a745; }
pre .copy-btn {
    position: absolute;
    top: 0.4rem;
    right: 0.4rem;
    padding: 0.25rem;
    line-height: 1;
    background: #fff;
    border: 1px solid rgba(0,0,0,.1);
    border-radius: 0.3rem;
    opacity: 0;
}
pre:hover .copy-btn { opacity: 1; }
pre .copy-btn:hover { border-color: #3f79ad; }
pre .copy-btn.copied { border-color: #28a745; }
pre code { white-space: pre; color: inherit; background: none; padding: 0; border-radius: 0; }
code {
    font-size: 87.5%;
    color: #3f79ad;
    background: #f0f4f8;
    padding: 0.15em 0.4em;
    border-radius: 0.25rem;
    word-wrap: break-word;
}
blockquote {
    display: block;
    background-color: #f8f9fb;
    padding: 1rem 1.25rem;
    margin: 1rem 0;
    border: none;
    border-left: 4px solid #3f79ad;
    border-radius: 0 0.25rem 0.25rem 0;
}

/* ===== Tables ===== */
table { background-color: #fff; border-collapse: separate; border-spacing: 0; width: 100%; margin-bottom: 1rem; border: 1px solid rgba(0,0,0,.1); border-radius: 0.5rem; overflow: hidden; }
thead td, th { padding: 0.6rem 0.9rem; font-weight: bold; background-color: #f8f9fb; text-align: left; border: none; border-bottom: 2px solid #dee2e6; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.03em; color: #495057; }
tbody td { border: none; border-bottom: 1px solid #edf0f2; padding: 0.55rem 0.9rem; }
tbody tr:nth-child(even) { background-color: #f8f9fb; }
tbody tr:hover { background: #eef3f8; }

/* ===== Images ===== */
img { max-width: 100%; height: auto; }

/* ===== Grid Layout ===== */
html { scroll-behavior: smooth; scroll-padding-top: 1rem; }
.container-fluid {
    width: 100%;
    padding-left: 2.2rem;
    padding-right: 2.2rem;
    margin-left: auto;
    margin-right: auto;
}
.row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -15px;
    margin-right: -15px;
}
.row > * {
    padding-left: 15px;
    padding-right: 15px;
}
.col-toc, .col-content, .col-sidebar, .col-footer {
    width: 100%;
}
/* col-toc: zero-width by default; children use position:fixed to float */
.col-toc { flex: 0 0 0px; max-width: 0; padding: 0; overflow: hidden; }
.col-toc-empty { display: none; }
@media (min-width: 768px) {
    .col-content { flex: 0 0 75%; max-width: 75%; }
    .col-sidebar { flex: 0 0 25%; max-width: 25%; }
    .col-footer  { flex: 0 0 75%; max-width: 75%; }
}
/* Large screens: inline TOC column, no toggle */
@media (min-width: 1200px) {
    .col-toc     { flex: 0 0 16%; max-width: 16%; padding: 0 15px; overflow: visible; position: relative; }
    .col-content { flex: 1 1 0%; min-width: 0; max-width: none; }
    .col-sidebar { flex: 0 0 26%; max-width: 26%; }
    .col-footer  { flex: 0 0 58%; max-width: 58%; margin-left: 16%; }
    .col-toc-empty + .col-content { flex: 0 0 74%; max-width: 74%; }
    .col-footer-notoc { margin-left: 0; }
}

/* ===== Navbar ===== */
.navbar {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    padding: 0.5rem 1rem;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
    z-index: 1030;
}
.navbar-dark { color: rgba(255,255,255,.5); }
.bg-dark { background-color: #343a40; }
.navbar-brand {
    display: flex;
    align-items: center;
    padding-top: 0.3125rem;
    padding-bottom: 0.3125rem;
    margin-right: 1rem;
    font-size: 1.25rem;
    line-height: inherit;
    white-space: nowrap;
    color: #fff;
    text-decoration: none;
}
.navbar-brand:hover { color: #fff; text-decoration: none; }

/* Hamburger toggle */
.navbar-toggler {
    display: none;
    padding: 0.25rem 0.75rem;
    font-size: 1.25rem;
    line-height: 1;
    background-color: transparent;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 0.25rem;
    cursor: pointer;
    color: rgba(255,255,255,.5);
    margin-left: auto;
}
.navbar-toggler-icon {
    display: inline-block;
    width: 1.5em;
    height: 1.5em;
    vertical-align: middle;
    background: no-repeat center center;
    background-size: 100% 100%;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.5%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Collapse */
.navbar-collapse {
    display: flex;
    flex-basis: auto;
    flex-grow: 1;
    align-items: center;
}

/* Nav */
.navbar-nav {
    display: flex;
    flex-direction: row;
    padding-left: 0;
    margin: 0;
    list-style: none;
}
.nav-item { position: relative; }
.nav-link {
    display: block;
    padding: 0.5rem;
    color: rgba(255,255,255,.5);
    text-decoration: none;
    transition: color 0.2s ease;
}
.nav-link:hover, .nav-link:focus { color: rgba(255,255,255,.9); text-decoration: none; }
.navbar-dark .active > .nav-link,
.navbar-dark .nav-item.active > .nav-link { color: #fff; }
.navbar-dark .active > .nav-link:hover,
.navbar-dark .active > .nav-link:focus { color: #fff; }

/* Mobile navbar */
@media (max-width: 767.98px) {
    .navbar { flex-wrap: wrap; }
    .navbar-toggler { display: block; }
    .navbar-collapse {
        display: none;
        flex-basis: 100%;
        flex-grow: 1;
    }
    .navbar-collapse.show { display: flex; flex-direction: column; align-items: flex-start; }
    .navbar-collapse.show .navbar-nav { flex-direction: column; width: 100%; }
    .navbar-collapse.show .nav-link { padding: 0.5rem 0; }
    .navbar-collapse.show .form-inline { width: 100%; margin-top: 0.5rem; }
}

/* ===== Dropdowns ===== */
.dropdown { position: relative; }
.dropdown-toggle { white-space: nowrap; cursor: pointer; }
.dropdown-toggle::after {
    display: inline-block;
    margin-left: 0.255em;
    vertical-align: 0.255em;
    content: "";
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-bottom: 0;
    border-left: 0.3em solid transparent;
}
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    display: none;
    min-width: 10rem;
    padding: 0.5rem 0;
    margin: 0.125rem 0 0;
    font-size: 0.9rem;
    color: #212529;
    background-color: #fff;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 0.5rem;
    background-clip: padding-box;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.dropdown-menu.show { display: block; }
.dropdown-item {
    display: block;
    width: 100%;
    padding: 0.2rem 1.5rem;
    clear: both;
    font-weight: 400;
    color: #212529;
    text-decoration: none;
    white-space: nowrap;
    background-color: transparent;
    border-left: 3px solid transparent;
}
.dropdown-item:hover, .dropdown-item:focus {
    color: #16181b;
    background-color: #f8f9fa;
    text-decoration: none;
    border-left-color: #3f79ad;
}
.dropdown-divider {
    height: 0;
    margin: 0.5rem 0;
    overflow: hidden;
    border-top: 1px solid #e9ecef;
}
/* Multi-column layout for long dropdown lists (Storage Systems, Commands) */
.dropdown-menu.pre-scrollable {
    columns: 2;
    max-height: none;
    overflow-y: visible;
    min-width: 30rem;
}
.dropdown-menu.pre-scrollable .dropdown-divider { column-span: all; }
.dropdown-menu.pre-scrollable .dropdown-letter-heading { column-span: none; }
/* Letter-group headings in Storage Systems dropdown */
.dropdown-letter-heading {
    display: block;
    padding: 0.3rem 1.5rem 0.1rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-left: 3px solid transparent;
    break-after: avoid;
}
@media (max-width: 767.98px) {
    .dropdown-menu.pre-scrollable {
        columns: 1;
        max-height: 30rem;
        overflow-y: auto;
        min-width: auto;
    }
}

/* ===== Cards ===== */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: #fff;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 0.5rem;
    margin: 0.75rem 0;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}
.card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.card-header {
    padding: 0.5rem 1rem;
    margin-bottom: 0;
    background-color: #f8f9fb;
    border-bottom: 1px solid rgba(0,0,0,.08);
    font-weight: 600;
    font-size: 0.85rem;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.card-body { padding: 0; }
.card-body > a { display: block; line-height: 0; }
.card-body > br { display: none; }
.card-body-padded { padding: 0.75rem; }

/* ===== Badges ===== */
.badge {
    display: inline-block;
    padding: 0.25em 0.4em;
    font-size: 75%;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
    color: #fff;
}
.badge-pill { padding-right: 0.6em; padding-left: 0.6em; border-radius: 10rem; }
.badge-primary { background-color: #3f79ad; }
a.badge-primary:hover, a.badge-primary:focus { background-color: #70caf2; text-decoration: none; }
a.badge-primary:focus { outline: 0; box-shadow: 0 0 0 0.2rem rgba(112,202,242,.5); }
.badge-secondary { background-color: #6c757d; }
.badge-success { background-color: #28a745; }
.badge-warning { background-color: #ffc107; color: #212529; }
.badge-danger { background-color: #dc3545; }

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.375rem;
    cursor: pointer;
    text-decoration: none;
    color: #fff;
    transition: color .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background-color: #3f79ad; border-color: #3f79ad; color: #fff; }
.btn-primary:hover { background-color: #70caf2; border-color: #70caf2; color: #fff; box-shadow: 0 4px 8px rgba(63,121,173,.25); }
.btn-primary:focus { background-color: #3f79ad; border-color: #3f79ad; box-shadow: 0 0 0 0.2rem rgba(63,121,173,.5); }
.btn-primary.dropdown-toggle:not(:disabled):not(.disabled):active,
.show > .btn-primary.dropdown-toggle { background-color: #70caf2; border-color: #70caf2; }

/* ===== List Group ===== */
.list-group {
    display: flex;
    flex-direction: column;
    padding-left: 0;
    margin-bottom: 0;
}
.list-group-item {
    position: relative;
    display: block;
    padding: 0.75rem 1.25rem;
    background-color: #fff;
    border: 1px solid rgba(0,0,0,.08);
}
.list-group-item + .list-group-item { border-top-width: 0; }
.list-group-item:first-child { border-top-left-radius: 0.5rem; border-top-right-radius: 0.5rem; }
.list-group-item:last-child { border-bottom-left-radius: 0.5rem; border-bottom-right-radius: 0.5rem; }

/* ===== Forms ===== */
.form-inline {
    display: flex;
    flex-flow: row wrap;
    align-items: center;
    margin: 0;
}
.form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    transition: border-color .15s, box-shadow .15s;
}
.form-control:focus {
    color: #495057;
    background-color: #fff;
    border-color: #3f79ad;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(63,121,173,.2);
}
.form-control-sm { padding: 0.25rem 0.5rem; font-size: 0.875rem; border-radius: 1.25rem; }
.form-inline .form-control { display: inline-block; width: auto; }

/* ===== Utilities ===== */
.d-flex { display: flex; }
.justify-content-between { justify-content: space-between; }
.mr-auto { margin-right: auto; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.float-right { float: right; }
.text-success { color: #28a745; }
.text-danger { color: #dc3545; }
.text-muted { color: #6c757d; }
.show { display: block; }

/* ===== Header Hover Links ===== */
.header-link {
    position: absolute;
    left: -1.5em;
    opacity: 0;
    transition: opacity 0.2s ease-in-out 0.1s;
}
h2:hover .header-link,
h3:hover .header-link,
h4:hover .header-link,
h5:hover .header-link,
h6:hover .header-link { opacity: 1; }
h2, h3, h4, h5, h6 { position: relative; }

/* ===== Inline SVG Icons ===== */
.icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
    fill: currentColor;
    stroke: currentColor;
}
.icon-fw { width: 1.25em; text-align: center; }
.icon-lg { width: 1.33em; height: 1.33em; vertical-align: -0.225em; }

/* ===== Rclone Custom ===== */
.rclone-logo {
    height: 36px;
    margin-top: -10px;
    margin-bottom: -10px;
}
.heart { color: #e31b23; fill: #e31b23; }
.bizbutton {
    background-color: #fb7a20;
    border-radius: 1.25rem;
    padding: 0.35rem 0.9rem;
    font-weight: 600;
}
.bizbutton:hover {
    background-color: #70caf2;
    border-color: #70caf2;
}
.menu { font-size: 95%; }
/* ===== Left TOC Sidebar ===== */
:root { --toc-panel-width: 280px; }
@media (max-width: 400px) { :root { --toc-panel-width: 85vw; } }

/* --- Floating toggle button (visible <1200px only) --- */
.toc-toggle {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1040;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 2.5rem;
    padding: 0;
    background: #f0f4f8;
    border: 1px solid #dee2e6;
    border-left: none;
    border-radius: 0 0.35rem 0.35rem 0;
    cursor: pointer;
    color: #6c757d;
    transition: left 0.3s ease, color 0.2s, background-color 0.2s;
}
.toc-toggle:hover { color: #3f79ad; background: #e4ecf4; }
.toc-toggle-icon {
    width: 0.8em;
    height: 0.8em;
    transition: transform 0.3s ease;
}
/* When panel is open, slide toggle to panel edge and flip icon */
.col-toc.toc-open .toc-toggle { left: var(--toc-panel-width); }
.col-toc.toc-open .toc-toggle-icon { transform: rotate(180deg); }

/* --- TOC overlay panel (<1200px) --- */
.toc-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--toc-panel-width);
    z-index: 1035;
    background: #fff;
    border-right: 1px solid #dee2e6;
    box-shadow: none;
    transform: translateX(-100%);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow-y: auto;
    padding: 1rem 1rem 1rem 1.25rem;
}
.col-toc.toc-open .toc-sidebar {
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0,0,0,.12);
}

/* --- Large screens (>=1200px): inline sticky TOC, no toggle --- */
@media (min-width: 1200px) {
    .toc-toggle { display: none; }
    .col-toc:not(.col-toc-empty)::after {
        content: "";
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 1px;
        background: linear-gradient(to bottom, transparent, #dee2e6 4rem, #dee2e6 calc(100% - 6rem), transparent);
    }
    .toc-sidebar {
        position: sticky;
        top: 1rem;
        left: auto;
        bottom: auto;
        width: auto;
        z-index: auto;
        background: transparent;
        border-right: none;
        box-shadow: none;
        transform: none;
        transition: none;
        padding: 0 1rem 0 0;
        max-height: calc(100vh - 2rem);
    }
}

/* --- TOC content styles --- */
.toc-title {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6c757d;
    padding: 0.75rem 0 0.5rem;
    white-space: nowrap;
    text-decoration: none;
}
.toc-title:hover { color: #495057; text-decoration: none; }
.toc-sidebar nav#TableOfContents ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.5;
}
.toc-sidebar nav#TableOfContents > ul > li > ul {
    padding-left: 0.75rem;
}
.toc-sidebar nav#TableOfContents li {
    margin: 0;
}
.toc-sidebar nav#TableOfContents a {
    display: block;
    padding: 0.15rem 0 0.15rem 0.6rem;
    color: #495057;
    border-left: 2px solid transparent;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
}
.toc-sidebar nav#TableOfContents a:hover,
.toc-sidebar nav#TableOfContents a.toc-active {
    white-space: normal;
    overflow: visible;
    word-break: break-word;
}
.toc-sidebar nav#TableOfContents a:hover {
    color: #3f79ad;
    text-decoration: none;
}
.toc-sidebar nav#TableOfContents a.toc-active {
    color: #3f79ad;
    border-left-color: #3f79ad;
    font-weight: 600;
}
/* Differentiate heading levels */
.toc-sidebar nav#TableOfContents > ul > li > a {
    font-weight: 600;
    color: #343a40;
}
.toc-sidebar nav#TableOfContents > ul > li > ul > li > a {
    font-weight: 400;
}
.toc-sidebar nav#TableOfContents > ul > li > ul > li > ul a {
    font-weight: 300;
    font-size: 0.78rem;
    color: #6c757d;
}

/* ===== Footer ===== */
footer { margin-top: 2rem; padding-bottom: 1rem; }
footer .card { background: #f8f9fb; border: none; box-shadow: none; }
footer .card:hover { box-shadow: none; }
footer p { margin-bottom: 0; color: #6c757d; line-height: 1.8; }
