/* Copyright: 2boom 2023-25 */
:root {
    --mred: #FF9D9F;
    --myellow: #FFD38C;
    --mgreen: #CBE070;
    --mdarkgreen: #11893A;
    --mdarkred: #C53131;
    --mblue: #9FADE3;
    --mviolet: #AE8FC0;
    --mdarkblue: #0881d8;
    --mbutbkghv: #0056b3;
    --mbutbkgac: #003d7a;
    --mmesborder: #ccc;
    --primary: #00A4E9; /* Blue */
    --success: #00D672; /* Green */
    --warning: #FF6433; /* Orange */
    --error: #FF2337; /* Red */
    --secondary: #F8AE3C; /* Yellow */
    /*--bgwhite: #FCFCFC;*/
    --bgyellow: #FFCD66;
    --bbyellow: #FAB120;
    --bggreen: #64B461;
    --bbgreen: #3E943B;
    --bgred: #ff2337;
    --bbred: #B81422;
    --bgorange: #FF6433;
    --bborange: #F23C0E;
    --bgwhite: #F5F5F5;
    --bggrey: #CFCFCF;
}

@media (prefers-color-scheme: dark) {
    :root {
        --color-scheme-background: #252525;
        --color-scheme-text-color: #EFEFEF;
        --mapp: #B9B9C8;
        --mmessage: #2b2b2b;
        --mdesc: #B9B9C8;
        --mbkg: #383838;
        --msbkg: #2B2B2B;
        --mhbkg: #454545;
        --mhbor: #FF595E;
        --mborder: #666666;
        --mactive: #B9B9C8;
        --minactive: #FF5C5F;
        --mexited: #F9B236;
        --mmenu: #838282;
        --hoo: #454545;
        --imgbkg: #2B2B2B;
        --mheader: #000000;
        --msearch: #3B3B3B;
        --mplaceholdertext: #C9C9C9;
    }
}

@media (prefers-color-scheme: light) {
    :root {
        --color-scheme-background: #F8F8F8;
        --color-scheme-text-color: #555657;
        --mapp: #313140;
        --mmessage: #e1e1e1;
        --mdesc: #696969;
        --mbkg: #F5F5F5;
        --msbkg: #FCFCFC;
        --mhbkg: #EEEEEE;
        --mhbor: #FF6368;
        --mborder: #CFCFCF;
        --mmenu: #909090;
        --mactive: #5E6E18;
        --minactive: #FF5C5F;
        --mexited: #F9B236;
        --hoo: #FBFBFB;
        --imgbkg: #EBEBEB;
        --mheader: #FFFFFF;
        --msearch: #FBFBFB;
        --mplaceholdertext: #808080;
    }
}

html {
    background: var(--color-scheme-background);
    color: var(--color-scheme-text-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.2;
    margin: 0;
    display: flex;
    justify-content: center;
}
body {
    margin: 5px 10px;
    font-size: 0.9em;
    max-width: 100%;
}

h1 {
    color: var(--mapp);
    font-size: 1em;
    margin: 5px 5px 8px;
}

.white-round {
        width: 13px;
        height: 13px;
        background-color: var(--bgwhite);
        border-radius: 50%;
        border: 1px solid var(--bggrey);
    }
.red-round {
        width: 12px;
        height: 12px;
        background-color:  var(--bgred);
        border-radius: 50%;
        border: 1px solid var(--bbred);
    }
.green-round {
        width: 12px;
        height: 12px;
        background-color:  var(--bggreen);
        border-radius: 50%;
        border: 1px solid var(--bbgreen);
    }
.yellow-round {
        width: 12px;
        height: 12px;
        background-color:  var(--bgyellow);
        border-radius: 50%;
        border: 1px solid var(--bbyellow);
    }
.orange-round {
        width: 12px;
        height: 12px;
        background-color:  var(--bgorange);
        border-radius: 50%;
        border: 1px solid var(--bborange);
    }

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
    background-color: var(--msbkg);
}

th, td {
    border: 1px solid;
    border-bottom-color: var(--mborder);
    border-top-color: var(--mborder);
    border-right-color: transparent;
    border-left-color: transparent;
    padding: 4px 4px 4px 6px;
    text-align: left;
}

th {
    background-color: var(--mhbkg);
    color: var(--mapp);
}

tr:nth-child(even) {
    background-color: var(--mbkg);
}

td span[title] {
    cursor: pointer;
}

.nowrap-size, .nowrap-created, .nowrap-image, .nowrap-digest, .nowrap-container{
    max-width: 100%;
    width: 100%;
    display: inline-block;
    white-space: nowrap;
}

.log-section {
    margin-top: 15px;
    width: 100%;
}

#logContent {
    white-space: pre-wrap;
    font-size: 0.95em;
    background: var(--mhbkg);
    padding: 8px 16px 8px 8px;
    border-radius: 3px;
    border: 1px solid var(--mborder);
    height: 198px;
    overflow-y: auto;
    line-height: 1.5;
}

.copyright {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding-bottom: 10px;
}

.copyright span {
    font-size: 0.85em;
    color: var(--mborder);
}

/* Mobile view adjustments for 720px */
@media (max-width: 720px) {
    .log-section {
        display: none;
    }
    .copyright {
        display: flex;
        justify-content: center; /* Changed from flex-end */
        align-items: center;
        width: 100%;
        margin-top: 8px;
        padding-bottom: 10px;
    }
    
    table, thead, tbody, th, td, tr {
        display: block;
    }

    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    tr {
        margin-bottom: 8px;
        border: none;
        background-color: var(--msbkg);
    }

    tr:nth-child(even) {
        background-color: var(--mbkg);
    }

    td {
        border: none;
        position: relative;
        padding: 3px 6px;
        text-align: left;
        line-height: 1.1;
        width: 100%;
        font-size: 1.0em;
    }

    td[data-label="Status"] {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        padding: 2px 6px;
    }

    td[data-label="Status"] span {
        margin-left: 0;
        padding: 2px;
    }
    td[data-label="Digest"] .truncate-digest {
        max-width: 98%;
        width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    td:last-child {
        border-bottom: none;
    }
    
    td[data-label="Count"] {
        display: none;
    }

    #logContent {
        max-height: 200px;
    }
}

@media (max-width: 768px) {
    td[data-label="Status"],
    td[data-label="Created"] {
        display: inline-block;
        width: auto;
        padding: 0 5px;
    }
}

@media (max-width: 768px) {
    td[data-label="Size"],
    td[data-label="Image"] {
        display: inline-block;
        width: auto;
        padding: 0 5px;
    }
}

@media (max-width: 768px) {
     td[data-label="Digest"] {
       max-width: 94%;
        width: 95%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}