@import url("theme-vars.css");

/*=====================================================================================================================*/

html {
    scrollbar-gutter: stable;
}

body {
    background: var(--vsc-bg);
    color: var(--vsc-fg);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif;
    font-size: 1em;
    margin: 0;
    padding: 0;
}

textarea {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif;
    font-size: 1em;
}
table {border-collapse:collapse;
margin: auto;
}

/* file input
**********************************************************************************************************/
.fileUploadInput {width:100%;max-width:100%;word-wrap:break-word;overflow:hidden;}
.fileNameDisplay {width:100%;max-width:100%;word-wrap:break-word;overflow:hidden;}

#optionsRow1, #optionsRow2
{
background-color: var(--vsc-bg-secondary);
}

/* (effectively) buttons */
input[type=button], input[type=submit], button, .button {
    background: var(--vsc-surface-alt);
    color: var(--vsc-fg);
    border: 1px solid var(--vsc-border);
    border-radius: 4px;
    font-weight: 300;
    font-size: 0.9em;
    padding-top: 0.3em;
    padding-bottom: 0.3em;
    cursor: pointer;
    outline: none;
    transition: background 0.2s, border-color 0.2s;
}
input[type=button]:hover, input[type=submit]:hover, button:hover, .button:hover {
    background: var(--vsc-accent);
    color: var(--vsc-accent-fg);
    border-color: var(--vsc-accent);
}
input[type=button]:focus, input[type=submit]:focus, button:focus, .button:focus {
    background: var(--vsc-accent-hover);
    color: var(--vsc-accent-fg);
    border-color: var(--vsc-border-strong);
}
input[type=button]:active, input[type=submit]:active, button:active, .button:active {
    background: var(--vsc-selection);
    color: var(--vsc-fg);
    border-color: var(--vsc-border-strong);
}

/* Submit button styling */
.submit-button {
    display: inline-block;
    padding: 16px 24px;
    font-size: 1em;
    color: var(--vsc-accent-fg);
    background: var(--vsc-accent);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    text-align: center;
    float: right;
}

.submit-button:hover {
    background: var(--vsc-accent-hover);
}

.submit-button:disabled {
    color: var(--vsc-fg-muted);
    background: var(--vsc-muted-bg);
    cursor: not-allowed;
}

@media (max-width: 767px) {
    .submit-button {
        display: block;
        width: 100%;
        float: none;
    }
}

/* checkboxes
**********************************************************************************************************/
input[type=checkbox] {border:none !important;box-shadow:none !important;}

/* action images
*******************************************************************************************************/
input[type=image] {background-color:transparent;}

/* links
***************************************************************************************************************/
a {text-decoration:underline;color:var(--vsc-link);display:inline;}
a:hover {text-decoration:none;}
a:active {text-decoration:none; color:var(--vsc-link-active) !important;}
a:visited {text-decoration:underline;color:var(--vsc-link);}

/* bold
****************************************************************************************************************/
b {color:inherit;}

/* step images
*********************************************************************************************************/
/* make step image downscaling look a little better */
.stepImage {image-rendering: optimizeSpeed;
image-rendering: -moz-crisp-edges;
image-rendering: -o-crisp-edges;
image-rendering: -webkit-optimize-contrast;
image-rendering: crisp-edges;
/*-ms-interpolation-mode: nearest-neighbor;*/ /*this actually looks fine in IE by default*/}


/*=====================================================================================================================*/


/* ubiquitous vertical spacers
*****************************************************************************************/
/* frequently has its height rule overwritten with an HTML style */
.spacer {display:block;width:100%;height:40px;clear:both;}
.formRowSpacer {width:100%;height:40px;}
.formRowLineSpacerTop {width:100%;height:10px;} /* design pattern using two spacers with a border between */
.formRowLineSpacerTop td {border:none !important;border-bottom:1px solid var(--vsc-border) !important;}
.formRowLineSpacerBottom {width:100%;height:10px;} /* design pattern using two spacers with a border between */
.formRowLineSpacerBottom td {border:none !important;}

/* ubiquitous tables
***************************************************************************************************/
/* mind the math; with default box-sizing, padding and width add together to make actual width */
.inputTable {width:650px;clear:both;}
.infoTable {width:650px;clear:both;}
.errorTable {width:650px;clear:both;margin:20px auto;}
.newsTable {width:650px;clear:both;margin:20px auto;}
.successTable {width:650px;clear:both;margin:20px auto;}
.formRow {}
.formRow td {border-bottom:14px solid transparent;}
.formRow:first-child td {border-top: 12px solid transparent;}
.formRowCondensed td {border-bottom:2px solid transparent;}
.formRowCondensed:first-child td {border-top: 2px solid transparent;}
.errorTable td, .newsTable td, .successTable td {padding-top:8px;padding-bottom:8px;vertical-align:text-top;}

.formLabelColumn
{min-width:140px;width:140px;max-width:140px;padding:0px;padding-right:10px;text-align:right;vertical-align:top;}
.formNumberColumn
{min-width:140px;width:140px;max-width:140px;padding:0px;padding-right:10px;text-align:right;vertical-align:middle;}
.formInputColumnLong
{min-width:660px;width:660px;max-width:660px;padding-right:70px;}
.formInputColumn
{min-width:550px;width:550px;max-width:550px;padding:0px;padding-right:10px;text-align:left;
vertical-align:middle;}
.fullMiddleWidth {width:550px;} /* we love IE8 */
.formRememberColumn
{min-width:170px;width:170px;max-width:170px;padding:4px
0px 0px 12px; text-align:left; vertical-align:top;}
.errorTable .formInputColumn, .errorTable .formLabelColumn, .errorTable .formRememberColumn
{background-color:var(--vsc-error-bg);}
.newsTable .formInputColumn, .newsTable .formLabelColumn, .newsTable .formRememberColumn
{background-color:var(--vsc-info);}
.successTable .formInputColumn, .successTable .formLabelColumn, .successTable .formRememberColumn
{background-color:var(--vsc-success-bg);}
.errorTable .formLabelColumn, .newsTable .formLabelColumn, .successTable .formLabelColumn {line-height:100%;}
.errorTable .formInputColumn, .newsTable .formInputColumn, .successTable .formInputColumn {font-size:95%;}

/* small text throughout
***********************************************************************************************/
.subtitle {font-size:0.8em;}
.advisory {font-size:0.8em;color:var(--vsc-fg-secondary);padding-bottom:4px;}
.error_advisory {font-size:0.8em;color:var(--vsc-error);}
.high_advisory {font-size:0.8em;color:var(--vsc-error);}
.success_advisory {font-size:0.8em;color:var(--vsc-success);}

/* color the left-hand labels, and sometimes important center content
**************************************************/
.label_error {font-size:1.4em;font-weight:bolder;color:var(--vsc-error);}
.label_news {font-size:1.4em;font-weight:bolder;color:var(--vsc-info);}
.label_required {font-size:1.4em;color:var(--vsc-fg);}
.label_success {font-size:1.4em;font-weight:bolder;color:var(--vsc-success);}
.label_optional {font-size:1.4em;color:var(--vsc-fg-muted);}

/* direct color grabs
**************************************************************************************************/
.errorText {color:var(--vsc-error);}
.newsText {color:var(--vsc-info);}
.successText {color:var(--vsc-success);}
.shadedText {color:var(--vsc-fg-muted);}

/* step 2 gray fields
**************************************************************************************************/
.message_heading {font-size:1.4em;color:var(--vsc-fg-muted);}
.message_body {font-size:1.4em;color:var(--vsc-fg-muted);}

/* admin and help pages
************************************************************************************************/
.shaded {background-color:var(--vsc-bg-secondary);}

/* "uploading, please wait" box
****************************************************************************************/
.progress-overlay-bg {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.45);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: all;
    overscroll-behavior: contain;
}
body.overlay-active {
    overflow: hidden !important;
    position: fixed !important;
    width: 100vw;
}

/* Progress Overlay Main Container */
.progress-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100vw;
    background: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
}

.progress-overlay-content {
    background: var(--vsc-surface);
    border-radius: 12px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.10);
    padding: 28px 28px 20px 28px;
    max-width: 500px;
    min-width: 220px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}
@media (max-width: 767px) {
    .progress-overlay-content {
        max-width: 98vw;
        width: 98vw;
        box-sizing: border-box;
        padding: 18px 6vw 16px 6vw;
    }
}

/* Progress Message */
.progress-message {
    font-size: 1.1em;
    font-weight: 500;
    margin-bottom: 18px;
    text-align: center;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    max-width: 400px;
    margin: 0 auto 0 auto;
}
.progress-bar-bg {
    width: 100%;
    height: 8px;
    border-radius: 6px;
    border: 1px solid var(--vsc-border);
    background: var(--vsc-bg-secondary);
    position: relative;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    background: var(--vsc-accent);
    border-radius: 6px 0 0 6px;
    transition: width 0.2s cubic-bezier(.4,0,.2,1);
    width: 0%;
}

/* Progress Status */
.progress-status {
    display: flex;
    flex-direction: row;
    margin-top: 12px;
    text-align: center;
    font-size: 0.98em;
    color: var(--vsc-fg-muted);
}
#progress-status-file-size:after {
    content: " -";
    display: inline;
}
@media (max-width: 767px) {
    .progress-overlay-content {
        max-width: 98vw;
        padding: 18px 6vw 16px 6vw;
    }
    .progress-bar {
        max-width: 98vw;
    }
    .progress-status {
        flex-direction: column;
        font-size: 1em;
    }
    #progress-status-transfer-speed {
        display: block;
        margin-top: 2px;
        margin-left: 0;
    }
    #progress-status-file-size:after {
        content: "";
        display: none;
    }
}
#progress-status-transfer-speed {
    display: inline;
    margin-left: 8px;
}

/* pickup
**************************************************************************************************************/
.recipientYesDownloaded {color:var(--vsc-fg) !important;}
.recipientNoDownloaded {color:var(--vsc-error) !important;}

/* relay
plus***********************************************************************************************************/
ul.suggestions li {font-size:.75em;margin-bottom:.5em;}
li.secure {list-style-image:url('../images/icon_lock.png');}
li.warning {list-style-image:url('../images/icon_warning.png');}

/* email fill
**********************************************************************************************************/
/* top and height properties are overwritten at run-time in index.php JavaScript */
#emailFillContainer
{display:none;position:absolute;top:10px;left:0px;width:100%;min-width:650px;height:180px;
color:var(--vsc-fg);background-color:rgba(255,255,255,0.95);/*background-image:url(/images/tileDots.png);background-position:left
top;background-repeat:repeat;background-size:20px 35px;*/
border:none;border-top:1px solid var(--vsc-border);border-bottom:1px solid var(--vsc-border);}
#emailFillContainerInner {display:block;width:650px;height:100%;
margin:0px auto;
overflow:auto;}
.emailHelperTextTable {width:100%;height:100%;}
.emailHelperTextTr {width:100%;height:100%;}
.emailHelperTextTd {width:100%;height:100%;
color:var(--vsc-fg-secondary);text-align:center;}
.emailFillCard {display:block;width:auto;height:auto;float:left;
padding:4px;margin:8px 0px 0px 8px;
cursor:pointer;}
.emailFillCardLineA {display:block;
color:var(--vsc-fg);
font-size:1.0em;
overflow:hidden;}
.emailFillCardLineB {display:block;
color:var(--vsc-fg-secondary);
font-size:0.8em;
overflow:hidden;}
.emailFillCardLineC {display:block;
color:var(--vsc-fg-secondary);
font-size:0.8em;
overflow:hidden;}

.transparent {
color: rgba(0, 0, 0, 0.3) !important;
}

.hidden {
    display: none !important;
}

/* Access Control/Download Type selectors
**************************************************************************************************************/

.selection-container {
    display: flex;
    flex-wrap: wrap;
}

.selection-item {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1 1 calc(33.333% - 2.8%); /* Three items per row with spacing */
    margin: 1%;
    outline: 4px solid var(--vsc-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.1s ease;
    box-sizing: border-box;
    background: var(--vsc-surface-alt);
    color: var(--vsc-fg-secondary);
    user-select: none;
}

.selection-item input[type="radio"] {
    display: none;
}

.selection-item .selection-content .selection-header {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 4px;
}

.selection-item .selection-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding: 10px;
}

.selection-item .icon {
    font-size: 1.25em;
    display: block;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.selection-item .title {
    font-weight: bold;
}

.selection-item .description {
    color: var(--vsc-fg-muted);
    font-size: 0.9em;
}

.selection-item:hover {
    outline-color: var(--vsc-accent-hover);
}

.selection-item:has(input[type="radio"]:checked) {
    outline: 4px solid var(--vsc-accent);
    color: var(--vsc-fg);
    background: var(--vsc-surface);
}

.selection-item:has(input[type="radio"]:checked) .selection-content {
    color: var(--vsc-fg);
}

.selection-item:has(input[type="radio"]:checked) .icon {
    opacity: 1;
}

.selection-item:focus {
    outline: 2px solid var(--vsc-accent, #0078d4);
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(0,120,212,0.18);
    z-index: 2;
}

.selection-item[aria-checked="true"]:focus {
    outline: 2px solid var(--vsc-accent, #0078d4);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(0,120,212,0.28);
    z-index: 3;
}

@media (max-width: 767px) {
    .selection-item {
        flex: 1 1 100%;
        margin-bottom: 10px;
    }
}


/* Settings grid styles */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    margin-top: 4px;
    margin-bottom: 4px;
    align-items: stretch;
}

@media (max-width: 767px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

/* Setting item styles */
.setting-item {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1 1 calc(50% - 2.8%);
    margin: 1%;
    border-radius: 8px;
    box-sizing: border-box;
    background: var(--vsc-surface-alt);
    color: var(--vsc-fg);
}

.setting-item .setting-content .setting-header {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 4px;
}

.setting-item .setting-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding: 6px;
}

.setting-item .icon {
    font-size: 1.25em;
    display: block;
    opacity: 1;
}

.setting-item .title {
    /* font-weight: bold;*/
}

@media (max-width: 767px) {
    .setting-item {
        flex: 1 1 100%;
    }
}

/* Logo container */
.logo-container {
    text-align: center;
    margin-bottom: 20px;
}

.logo {
    max-width: 200px;
    height: auto;
}

/* Theme-aware logo color */
.title-block,
.title-block img,
.title-block svg {
    color: var(--vsc-fg);
}

/* Theme-aware logo display */
.logo-light { display: inline; }
.logo-dark { display: none; }

html.theme-dark .logo-light { display: none; }
html.theme-dark .logo-dark { display: inline; }

html.theme-light .logo-light { display: inline; }
html.theme-light .logo-dark { display: none; }

html.theme-auto .logo-light { display: inline; }
html.theme-auto .logo-dark { display: none; }

@media (prefers-color-scheme: dark) {
  html.theme-auto .logo-light { display: none; }
  html.theme-auto .logo-dark { display: inline; }
}

.themed-icon { filter: none; transition: filter 0.2s; }
html.theme-dark .themed-icon { filter: invert(1) brightness(2); }
html.theme-light .themed-icon { filter: none; }
html.theme-auto .themed-icon { filter: none; }
@media (prefers-color-scheme: dark) {
  html.theme-auto .themed-icon { filter: invert(1) brightness(2); }
}

.themed-icon-muted { filter: opacity(0.5); transition: filter 0.2s; }
html.theme-dark .themed-icon-muted { filter: invert(1) brightness(2) opacity(0.5); }
html.theme-light .themed-icon-muted { filter: opacity(0.5); }
html.theme-auto .themed-icon-muted { filter: opacity(0.5); }
@media (prefers-color-scheme: dark) {
  html.theme-auto .themed-icon-muted { filter: invert(1) brightness(2) opacity(0.5); }
}

.muted {
    color: var(--vsc-fg-muted);
}

/* Wrapper styling */
.wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 900px;
    margin: 0 auto;
    padding: 16px;
}

/* Form container */
.form-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
    background-color: var(--vsc-surface-alt);
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.form-section.settings {
    gap: 32px;
}

.general-info-section {
    gap: 12px;
}

.file-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-list-manage {
    display: flex;
    flex-direction: column;
    gap: 0px;
}

.upload-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
}

@media (max-width: 767px) {
    .upload-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

.setting-group {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 4px;
}

@media (max-width: 767px) {
    .form-section {
        padding: 12px;
    }
    .setting-group {
        flex-direction: column;
    }
}

/* Form groups */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-group label.optional {
    font-style: italic;
}

.form-group label.error {
    color: var(--vsc-error);
}

.form-group .advisory {
    font-size: 0.9em;
    color: var(--vsc-fg-secondary);
}

.form-input {
    padding: 10px;
    font-size: 1em;
    border: 1px solid var(--vsc-border);
    color: var(--vsc-fg);
    border-radius: 5px;
    width: 100%;
    box-sizing: border-box;
    resize: vertical;
    background: var(--vsc-surface);
}

.form-input, #recipients_input_box {
    padding: 10px;
    font-size: 1em;
    border: 1px solid var(--vsc-border);
    color: var(--vsc-fg);
    border-radius: 5px;
    box-sizing: border-box;
    resize: vertical;
    background: var(--vsc-surface);
}

.password-icon-field {
    position: relative;
    display: inline-block;
    align-items: center;
    width: 100%;
}

.password-icon-field .show-password-button {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    padding: 0px;
    background: none;
    border: none;
}

.eye-icon {
  display: block;
  text-indent: -9999px;
  width: 24px;
  height: 24px;
  background: url(/images/eye.svg);
  background-size: 24px 24px;
}

.eye-closed-icon {
  display: block;
  text-indent: -9999px;
  width: 24px;
  height: 24px;
  background: url(/images/eye-closed.svg);
  background-size: 24px 24px;
}

input.icon-right {
    padding-right: 40px; /* Add space for the icon */
}

input::-ms-reveal {
  display:none;
}

.password-container {
    display: flex;
    gap: 10px;
}

.password-container .password-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Mobile responsiveness */
@media (max-width: 767px) {
    .password-container {
        flex-direction: column;
    }

    .wrapper {
        padding: 6px;
    }
}

.input-with-icon {
    position: relative;
    display: inline-block;
    width: 250px
}

.input-with-icon .input-icon {
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
}

.input-with-icon select {
    padding-left: 40px; /* Add space for the icon */
    box-sizing: border-box;
}

select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: 10px;
    font-size: 16px;
    border: 1px solid var(--vsc-border);
    border-radius: 5px;
    background-color: var(--vsc-surface);
    width: 200px;
}

.input-with-icon::after {
    content: "\25BC"; /* Unicode for down arrow */
    font-size: 14px;
    color: var(--vsc-fg-muted);
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    pointer-events: none; /* Prevents interaction */
}

/* Error container styling */
.error-container {
    display: flex;
    align-items: center;
    gap: 24px;
    background: var(--vsc-error-bg);
    border-radius: 10px;
    padding: 24px;
}

.error-container .error-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 48px;
    height: 48px;
    background: var(--vsc-error-bg);
    border-radius: 100px;
    border: 2px solid var(--vsc-error);
    flex-shrink: 0;
}

.error-container .error-icon img {
    width: 32px;
    height: 32px;
}

.error-container .error-message {
    font-size: 1em;
    color: var(--vsc-error);
    flex-grow: 1;
}

/* Error/expired/"all files downloaded" message styling */
.all-files-downloaded-message, .expired-transaction-message {
    color: var(--vsc-error);
    background: var(--vsc-error-bg);
    border: 1px solid var(--vsc-error);
    border-radius: 4px;
    padding: 1em 1.5em;
    margin: 0em auto 1em;
    text-align: center;
    font-size: 1.1em;
    max-width: 700px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    display: flex;
    align-items: center;
}

/* Upload Page */
.recipient-badge {
    border-radius: 4px;
    padding: 4px 8px;
    color: var(--vsc-fg);
    background: var(--vsc-surface-alt);
}

.external-recipient-badge {
    border-radius: 4px;
    padding: 4px 8px;
    color: var(--vsc-fg-secondary);
    background: var(--vsc-bg-secondary);
}

.recipient-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 0px;
    align-items: center;
}

.hidden-separator {
    color: var(--vsc-bg);
}

.upload-button-container {
    display: flex;
    gap: 8px;
    justify-content: end;
    align-items: center;
}

#upload-stats {
    text-align: end;
}

/* Mobile responsiveness */
@media (max-width: 767px) {
    .upload-button-container {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    #upload-stats {
        text-align: start;
        width: 100%;
    }
}

.form-error-message {
    display: none;
    margin-top: 10px;
    background: var(--vsc-error-bg);
    color: var(--vsc-error);
    border-radius: 8px;
    padding: 10px;
    font-weight: bold;
    font-size: 1em;
}

.input-error {
    background: var(--vsc-error-bg) !important;
}

/* Sender: Delete transaction row */
.delete-transaction-row {
    display: flex;
    align-items: center;
    justify-content: end;
    gap: 18px;
}
.delete-transaction-button {
    background: var(--vsc-error);
    color: var(--vsc-bg);
    padding: 8px 22px;
    border-radius: 6px;
    font-weight: bold;
    text-decoration: none;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
    font-size: 1em;
}
.delete-transaction-button:hover {
    background: var(--vsc-error-bg);
}

/* Recipient Download Table */
.recipient-download-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 6px;
}
.recipient-download-table th {
    background: var(--vsc-table-header-bg);
    color: var(--vsc-table-header-fg);
    font-weight: bold;
    padding: 8px 16px;
    text-align: left;
}
.recipient-download-table th:first-child {
    border-radius: 6px 0 0 6px;
}
.recipient-download-table th:last-child {
    border-radius: 0 6px 6px 0;
}
.recipient-download-table td {
    padding: 8px 16px;
    background: var(--vsc-table-row-bg);
}
.recipient-download-table tr.downloaded-yes td {
    background: var(--vsc-table-row-success-bg);
}
.recipient-download-table tr.downloaded-no td {
    background: var(--vsc-table-row-error-bg);
}
.recipient-download-table td:first-child {
    border-radius: 6px 0 0 6px;
}
.recipient-download-table td:last-child {
    border-radius: 0 6px 6px 0;
}
.recipient-download-table .download-status-yes {
    color: var(--vsc-success);
    font-weight: bold;
}
.recipient-download-table .download-status-no {
    color: var(--vsc-error);
    font-weight: bold;
}

/* File action buttons container (default: vertical stack) */
.file-action-buttons {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    width: auto;
    min-width: 0;
}

/* Equal width for file action buttons in a stack (download/view/listen only) */
.file-action-buttons.equal-width .file-action-btn-equal {
    flex: 1 1 0;
    width: 100%;
    box-sizing: border-box;
}

/* File list header row for horizontal button groups (e.g., Manage/Download All) */
.file-list-header-row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 4px;
    width: 100%;
}

@media (max-width: 767px) {
    .file-list-header-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        width: 100%;
    }
    .file-action-buttons {
        align-items: stretch;
        gap: 4px;
        width: 100%;
    }
}

/* Outlined file action button */
.file-action-btn {
    width: auto;
    <!-- min-width: 90px; -->
    max-width: 100%;
    display: flex;
    align-items: center;
    text-decoration: none;
    padding: 6px 14px;
    font-size: 1em;
    font-weight: 500;
    border-radius: 6px;
    border: 1px solid var(--vsc-border);
    background: var(--vsc-surface-alt);
    color: var(--vsc-fg);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    text-align: center;
    box-sizing: border-box;
    height: 2.1em;
}
.file-action-btn:visited {
    color: var(--vsc-fg);
    text-decoration: none;
}
.file-action-btn:hover, .file-action-btn:focus {
    background: var(--vsc-table-row-alt-bg);
    border-color: var(--vsc-fg);
    color: var(--vsc-fg);
    text-decoration: none;
}
.file-action-btn:active {
    background: var(--vsc-table-header-bg);
    border-color: var(--vsc-fg);
    color: var(--vsc-fg);
}

.file-action-btn-fit {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    flex: 0 0 auto !important;
}

.file-action-btn-alt {
    border: 1px solid var(--vsc-border);
    background: var(--vsc-accent);
    color: var(--vsc-accent-fg);
}
.file-action-btn-alt:visited {
    color: var(--vsc-accent-fg);
}
.file-action-btn-alt:hover, .file-action-btn-alt:focus {
    background: var(--vsc-accent-hover);
    color: var(--vsc-accent-fg);
    border-color: var(--vsc-accent-fg);
    text-decoration: none;
}

.file-action-icon {
    width: 23px;
    height: 23px;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

.file-action-text {
    display: inline-block;
    vertical-align: middle;
    font-size: 0.9em;
    line-height: 1em;
    margin-left: 6px;
}

/* Danger file action button */
.file-action-btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 1em;
    color: var(--vsc-error-fg, #fff) !important;
    background-color: var(--vsc-error, #e53935);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    text-decoration: none;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(229,57,53,0.08);
}
.file-action-btn-danger:hover, .file-action-btn-danger:focus {
    background-color: color-mix(in srgb, var(--vsc-error, #e53935) 80%, #000 20%);
    color: var(--vsc-error-fg, #fff);
    text-decoration: none;
}
.file-action-btn-danger:active {
    background-color: color-mix(in srgb, var(--vsc-error, #e53935) 60%, #000 40%);
    color: var(--vsc-error-fg, #fff);
}
@supports not (background-color: color-mix(in srgb, red 80%, #000 20%)) {
    .file-action-btn-danger:hover, .file-action-btn-danger:focus {
        background-color: #b71c1c;
    }
    .file-action-btn-danger:active {
        background-color: #7f0000;
    }
}
.copy-link-text {
    display: none;
}
@media (max-width: 767px) {
    .copy-link-text {
        display: block;
        padding: 8px;
    }
}
.note {
    /* Firefox: always show if scrollable */
    scrollbar-width: auto;
    /* Chrome/Edge/Safari: always show scrollbar if scrollable */
    overflow-y: scroll;
    width: 100%;
}
.note::-webkit-scrollbar {
    width: 8px;
    background: var(--vsc-scrollbar-bg);
}
.note::-webkit-scrollbar-thumb {
    background: var(--vsc-scrollbar-thumb);
    border-radius: 4px;
}

/* Note acceptance gate */
.note-acceptance-label {
    font-weight: 600;
    font-size: 1.1em;
    margin-bottom: 8px;
}

.note-scroll-area {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--vsc-border);
    padding: 12px;
    border-radius: 8px;
}

#scroll-reminder {
    color: var(--vsc-fg-secondary);
    margin-top: 6px;
    margin-bottom: 4px;
    text-align: end;
}

#accept-note-btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

#note-decline-message {
    color: #b00;
    font-weight: bold;
    margin-top: 16px;
}

.password-submit-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: nowrap;
}

@media (max-width: 767px) {
    .password-submit-row {
        flex-direction: column;
        align-items: stretch;
    }
}

.password-submit-fullheight {
  height: auto;
  align-self: stretch;
  min-width: 90px;
  min-height: 38px;
}

.side-desktop-stacked-mobile {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    flex: 1;
    gap: 8px;
}

@media (max-width: 767px) {
    .side-desktop-stacked-mobile {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 16px;
    }
}

.mobile-only { display: none !important; }
.desktop-only { display: block !important; }
@media (max-width: 767px) {
  .mobile-only { display: flex !important; }
  .desktop-only { display: none !important; }
}

/* Slingshot table styling */
.slingshot-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 4px;
    overflow: hidden;
    table-layout: auto;
}
.slingshot-table th, .slingshot-table td {
    padding: 6px 9px;
    text-align: left;
    vertical-align: middle;
    border-right: 1px solid var(--vsc-border);
    font-size: 1em;
}
.slingshot-table th:last-child, .slingshot-table td:last-child {
    border-right: none;
}
.slingshot-table th {
    background: var(--vsc-table-header-bg, #f5f5f5);
    color: var(--vsc-table-header-fg, #222);
    font-weight: 600;
    font-size: 1.05em;
}
.slingshot-table tr {
    background: var(--vsc-surface);
}
@media (max-width: 767px) {
    .slingshot-table th, .slingshot-table td {
        padding: 8px 6px;
        font-size: 0.95em;
    }
}

/* Help Pages */
.help-section {
    grid-column: span 2;
    background: var(--vsc-surface-alt);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 24px 18px;
    margin-bottom: 0;
}
.help-category-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 767px) {
    .help-category-grid {
        grid-template-columns: 1fr;
    }
}
.help-category-card {
    display: block;
    background: var(--vsc-surface-alt);
    border-radius: 8px;
    padding: 24px 18px;
    text-decoration: none;
    color: inherit;
}
.full-width-card {
    grid-column: span 2;
}
@media (max-width: 767px) {
    .full-width-card {
        grid-column: unset;
    }
}
.help-category-card b {
    font-size: 1.2em;
}
.help-category-card span,
.help-links {
    display: flex;
    flex-direction: column;
    margin-top: 8px;
    color: var(--vsc-fg-secondary);
}

@keyframes infinite-rotate {
  100% { transform: rotate(360deg); }
}
.rotating {
  animation: infinite-rotate 1s linear infinite;
}

ul.notes-list li b {
    color: var(--vsc-accent)
}

#note-edit-controls {
    display: flex;
}
#note-content.editing {
    color: var(--vsc-fg) !important;
    padding: 8px;
}
hr {
    margin:4px 0 4px 0;
    border-color: var(--vsc-fg);
    opacity:0.04;
}

.manage-body {
    padding-left: 16px;
    margin-top: 8px;
    border-left: 3px solid var(--vsc-border-light);
}
/* === Clean Timeline Vertical Line === */
#timeline {
    position: relative;
    margin-left: 0;
    padding-left: 0;
}
#timeline:after {
    content: "";
    width: 2px;
    position: absolute;
    top: 0.5rem;
    bottom: 0rem;
    left: 10px;
    z-index: 1;
    background: var(--vsc-surface-alt);
}
.timeline-item {
    position: relative;
    min-height: 24px;
    margin-bottom: 12px;
    padding-left: 40px;
    display: flex;
    align-items: flex-start;
}

#timeline .timeline-item:after {
    content: "";
    width: 10px;
    height: 10px;
    background: var(--vsc-surface-alt);
    border: 2px solid var(--vsc-bg);
    border-radius: 50%;
    position: absolute;
    left: 4px;
    top: 3px;
    z-index: 2;
}

#timeline .timeline-item.last::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 18px;
    bottom: 0;
    width: 12px;
    background: var(--vsc-bg);
    z-index: 3;
}
.timeline-event-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.timeline-date {
    color: var(--vsc-fg-secondary);
    font-size: 0.95em;
    font-weight: 400;
    margin-bottom: 0;
    white-space: nowrap;
}
.timeline-action {
    font-size: 0.97em;
    color: var(--vsc-fg);
    font-weight: 500;
    line-height: 1.2;
}
@media (max-width: 767px) {
    #timeline .timeline-item.last::before {
        left: 18px;
        top: 18px;
        bottom: 0;
        width: 12px;
        background: var(--vsc-bg);
    }
    #timeline:after {
        left: 18px;
    }
    .timeline-item {
        padding-left: 44px;
        margin-bottom: 18px;
    }
    #timeline .timeline-item:after {
        left: 12px;
        top: 3px;
        width: 10px;
        height: 10px;
        background: var(--vsc-surface-alt);
        border: 2px solid var(--vsc-bg);
    }
    .timeline-event-text {
        gap: 1px;
    }
    .timeline-date {
        margin-bottom: 2px;
        display: block;
    }
    .timeline-action {
        display: block;
    }
}