:root {
    --base-padding: 1rem;
    --box-width: calc(100% - (var(--base-padding) * 2));
    --font-size-base: 16px;
    --header-height: 60px;
    --footer-height: 40px;
    --color-text-primary: #ffffff; 
    --color-text-secondary: #a2a2a2;
    --color-page-background:rgb(10, 10, 10);
    --color-box-background: rgb(19, 19, 19);
    --color-background-secondary: rgb(37 37 37 / 58%);
    --color-box-border: rgba(255, 255, 255, 0.125);
    --color-box-shadow: rgba(174, 239, 148, 0.05);
    --color-accept: #198a14;
    --color-decline: rgba(200, 0, 0, 1); 
    --color-modal-background: rgba(0, 0, 0, 0.75);
    --color-bg-semi-transparent: rgba(0, 0, 0, 0.3);
    --border-radius: 8px;
     --transition: 200ms ease; 
}
[data-theme="light"] {
    --color-text-primary: #000000;
    --color-text-secondary: #828282;
    --color-page-background: #ffffff;
    --color-box-background: #fff;
    --color-background-secondary: rgba(243, 242, 242, 0.7);
    --color-box-border: rgba(0, 0, 0, 0.125);
    --color-box-shadow: rgba(0, 0, 0, 0.05);
    --color-bg-semi-transparent: rgba(255, 255, 255,, 0.3);
    #canvas-background {display: none;}
}

html {
    background-color: var(--color-page-background);
    transition: background-color var(--transition), color var(--transition);
}
html, body {
    font-family: -apple-system, "system-ui", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    font-size: var(--font-size-base); 
    margin: 0;
    color: var(--color-text-primary);  
}
 
div[id^="template"] {
    display: none;  
}

a {
    cursor: pointer;
}
 
#canvas-background { 
    /* opacity: 0.3; */
    background-color: var(--color-page-background);
    display:block; 
    width:100%; 
    height:100%; 
    position:fixed;
    top:0;
    left:0;
    z-index:-1;
}

header {
    display: flex;
    background-color: var(--color-bg-semi-transparent);
    align-items: center;
    height: var(--header-height);
    position: fixed;
    top: 0;
    width: 100%;
    backdrop-filter: blur(5px);
    z-index: 10;
}
header img {
    margin-left: var(--base-padding);
    margin-right: 10px;
    height: 30px; /* Adjust as needed */
    width: auto; /* Maintain aspect ratio */
}

#user_id_display {
    margin-left: auto;
    margin-right: var(--base-padding);
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    cursor: pointer;
}

footer { 
    width: 100%; 
    box-sizing: border-box;
    padding: 20px;
    position: fixed;
    display: flex;
    justify-content: space-between;
    bottom: 0;
    font-size: calc(var(--font-size-base) * 0.8);
    color: var(--color-text-secondary);
    backdrop-filter: blur(5px);
}

#toggle-theme {
    width: 24px;
    height: 24px;
    background-color: var(--color-box-background); 
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
}

main {
    margin-top: calc( var(--header-height) + var(--base-padding)); /* To avoid overlap with fixed header */
    margin-bottom: var(--footer-height); /* To avoid overlap with fixed footer */
    display: flex;
    flex-wrap: wrap; /* Allows boxes to wrap to the next line */
    justify-content: center;
    padding: var(--base-padding);
    gap: calc(var(--base-padding) * 2); /* Space between boxes */
}

.box-header {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.box-subheading {
    font-size: 1.0rem;
    margin-bottom: 0.5rem;
    margin-top: 2rem; 
}
.light-text {
    color: var(--color-text-secondary);
}
.solid-background {
    background-color: var(--color-box-background);
}
.content-box {  
    border: 1px solid var(--color-box-border);
    border-radius: var(--border-radius);
    padding: var(--base-padding); 
    width: var(--box-width);  
    box-sizing: border-box;
    backdrop-filter: blur(5px);
    margin-bottom: 20px;
}

.test-links {
    opacity: 0.5;
    color: var(--color-text-secondary);
    text-decoration: none; 
}
.test-links a { 
    color: var(--color-text-secondary);
    text-decoration: none;
    margin-right: 10px;
}
.box-shadow {
    box-shadow: 0 .25rem .75rem var(--color-box-shadow);
}

.border-top {
    border-top: 1px solid var(--color-box-border);
}

.can-hover:hover {
    cursor: pointer;
    box-shadow: 0 0 3px 0px var(--color-box-border);
    transform: translate(0, -1px);
    transition: all 0.2s ease-in-out;
}


.button-group {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.button-group button {
    all: unset;
    padding: 12px;  
    color: var(--color-text-primary);
    cursor: pointer;
    border-radius: var(--border-radius);
    border-width: 1px;
    border-style: solid; 
}
 
.button-decline {
    border-color: var(--color-decline) !important;
    background-color: var(--color-decline) !important; 
    color: white !important;
}

.button-accept:disabled {
    border-color: var(--color-box-border) !important; 
    opacity: 0.5;
}
.button-accept:enabled {
    background-color: var(--color-accept) !important;
    border-color: var(--color-accept) !important;
    color: white !important;
    opacity: 1;
}

.img-preview {
    border-radius: var(--border-radius);
    border-style: solid;
    border-width: 1px;
    border-color: var(--color-box-border);
    width: 30%;
}
 
/* upload */
.drop-area.highlight {
    background-color: var(--color-text-secondary);
}

#preview-area img {
    max-width: 100px;
    max-height: 100px;
    margin: 5px;
}

.upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    color: var(--color-text-secondary);
    font-family: sans-serif;
    font-size: 16px;
    cursor: pointer;
    user-select: none;
    /* height: 100%; */
    border-width: 1px; 
    border-color: var(--color-box-border);
    border-style: dashed;
    border-radius: var(--border-radius);
    text-align: center;
    min-height: 35px; 
}

.upload-icon {
    font-size: 24px;
    margin-bottom: 10px;
}

.upload-text {
    font-size: 14px;
}

#_templateFile {
    display: none;
}

.file-date-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--color-background-secondary);
    border-radius: var(--border-radius);
    margin-top: 10px;
    margin-bottom: 10px;
    padding: 10px;
}

.file-date { 
    opacity: 0.7;
}

.file-name {
    flex: 1;   
    align-items: center;
    margin-left: 10px;
    margin-right: 10px;
}

.file-delete {
    display: flex; 
    align-items: center;
}

.file-list-wrapper {
    margin: 20px 0;
} 
.file-container {
    display: flex;
    background-color: var(--color-background-secondary);
    border-radius: var(--border-radius);
    padding: 10px;
}

.left-column {
    display: flex;
    align-items: center; 
}
.left-column input {
    width: 80px;
    height: 30px;
    background: none;
    border: 0;
    outline: 0;
    color: var(--color-text-primary);
    text-align: center;
    margin-right: 10px;
    min-height: 35px;
    font-size: var(--font-size-base);
    opacity: 0.8;
}

.date-divider {
    margin: 5px;
}
.drop-area {
    flex: 1; 
    min-height: 35px;
    align-items: center;
}

.right-column {  
    display: flex;
    /* padding: 10px; */
    align-items: center;
    min-width: var(--base-padding);
} 

.delete-button {
    all: unset;
    background-color: var(--color-decline);
    color: white;
    border: none;
    border-radius: 5px;
    padding: 8px;
    /* width: 25px; */
    /* height: 25px; */
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    /* opacity: 0.7; */
} 

.btn-upload-all {
    all: unset;
    padding: 15px;
}

.version {
    font-size: 10px;
}
@media (max-width: 600px) {
    :root{
        --base-padding: 0.75rem; 
        --font-size-base: 15px;
        --header-height: 52px;
        --footer-height: 64px;
        --border-radius: 6px;
    } 

    .button-group button { 
        text-align: center;
    }

    .box-header {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }

    .box-subheading {
        font-size: 0.95rem;
        margin-top: 1rem;
    }

    .img-preview {
        width: 100%;
        height: auto;
    }
  
    .can-hover:hover {
        transform: none;
        box-shadow: none;
    }
    .button-group {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .button-group button {
        width: 100%;
        box-sizing: border-box;
    }
}