/* static/css/leftContainer.css */

/* ##########################
        Color Setting
########################## */ 
:root {
    --bg-left:             rgb(23,23,23);
    --bg-left-header:      rgb(23,23,23);
    --bg-left-middle:      rgb(23,23,23);
    --bg-left-bottom:      rgb(23,23,23);
    --text-app-title:      rgb(255, 255, 255);
    --bg-upload-new-img-btn: rgb(23,23,23);
    --text-upload-new-img-btn: rgb(255, 255, 255);
    --border-upload-new-img-btn: 1px solid rgb(255, 255, 255);
    /* Model Box */
    --bg-modal-box: rgb(34,34,34);
    --text-modal-box: rgb(255,255,255);
}
[data-theme="light"] {
    --bg-left:            linear-gradient(to bottom, rgb(74, 106, 118), rgb(40, 39, 40));
    --bg-left-header: transparent;
    --bg-left-middle: transparent;
    --bg-left-bottom: transparent;
    --text-app-title:      rgb(47, 47, 47);
    --bg-upload-new-img-btn: rgb(97, 136, 155);
    --text-upload-new-img-btn: rgb(255, 255, 255);
    --border-upload-new-img-btn: 1px solid rgb(97, 136, 155);
    /* Model Box */
    --bg-modal-box: rgb(190,190,190);
    --text-modal-box: rgb(0,0,0);
}





/* ###########################
        Left Container
########################### */ 
.left-container {
    display: flex;
    flex-direction: column;

    position: fixed;
    top: 0;
    left: 0;

    width: 200px;
    height: 100vh;
    height: 100dvh;

    z-index: 3000;

    overflow: hidden;

    background: var(--bg-left);
    box-sizing: border-box;
}
/* Chrome, Edge, Safari */
.left-container::-webkit-scrollbar {
    width: 5px;
}
.left-container::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
}
.left-container::-webkit-scrollbar-thumb {
    background-color: var(--scrollbar-thumb);
    border-radius: 10px;
    border: 1px solid var(--scrollbar-track);
}
.left-container::-webkit-scrollbar-thumb:hover {
    background-color: var(--scrollbar-thumb-hover);
}
/* Firefox */
.left-container {
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}





/* ###########################
        1st Part: Header
########################### */ 

/* Main Settings */
.left-container-header {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: var(--bg-left-header);
    z-index: 20;
    position: relative;

    flex: 0 0 auto;
    flex-shrink: 0;
}
/* -----App Logo----- */
.logo-container {
    display: flex;
    position: relative;
    z-index: 4000;
    align-items: center;
    justify-content: center;
    width: 190px;
    height: 78px;
}
.app-logo {
    width: 148px;
    height: 36px;
    justify-content: center;
    align-items: center;
    object-fit: contain;
}
.logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  cursor: pointer;
}
.logo-link:focus {
  outline: none;
}
.logo-link:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 4px;
  border-radius: 6px;
}
/* -----Account----- */

.viewer-hidden {
  display: none !important;
}

.viewer-account-container {
  position: relative;
  width: calc(100% - 24px);
  margin: 14px 12px 12px 12px;
  z-index: 4100;
}

/* Account main button */
.viewer-account-card {
  width: 100%;
  min-height: 42px;

  display: flex;
  align-items: center;
  gap: 10px;

  padding: 10px 4px;

  border: none;
  border-radius: 0;

  background: transparent;
  color: #ffffff;

  font-family: 'PingFangHKWeb', sans-serif;
  font-size: 15px;
  text-align: left;

  cursor: pointer;
  box-sizing: border-box;
  transition: background-color 0.15s ease;
}

.viewer-account-card:hover,
.viewer-account-card.active {
  background: rgba(255, 255, 255, 0.07);
}

.viewer-account-card:focus {
  outline: none;
}

.viewer-account-card:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.75);
  outline-offset: 2px;
}

/* Account icon */
.viewer-account-avatar {
  width: 30px;
  height: 30px;
  object-fit: contain;
  flex-shrink: 0;
}

/* User name / Sign In */
.viewer-account-name {
  flex: 1;
  min-width: 0;

  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Dropdown arrow */
.viewer-account-chevron {
  margin-left: auto;
  font-size: 18px;
  line-height: 1;
  opacity: 0.75;
  flex-shrink: 0;

  transition: transform 0.15s ease;
}

.viewer-account-card[aria-expanded="true"] .viewer-account-chevron {
  transform: rotate(180deg);
}

/* Dropdown menu */
.viewer-account-menu {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;

  z-index: 5000;

  display: block;
  padding: 6px;

  background: rgb(35, 35, 35);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;

  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.42);
  box-sizing: border-box;
}

.viewer-account-menu[hidden] {
  display: none !important;
}

/* Email displayed inside menu */
.viewer-account-email {
  padding: 8px 10px 10px 10px;
  margin-bottom: 4px;

  color: rgba(255, 255, 255, 0.58);
  font-family: 'PingFangHKWeb', sans-serif;
  font-size: 11px;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

/* Login / Logout buttons */
.viewer-account-menu-btn {
  display: block;
  width: 100%;

  padding: 9px 10px;

  border: none;
  border-radius: 4px;

  background: transparent;
  color: #ffffff;

  font-family: 'PingFangHKWeb', sans-serif;
  font-size: 14px;
  text-align: left;

  cursor: pointer;
  transition: background-color 0.15s ease;
}

.viewer-account-menu-btn:hover {
  background: rgba(255, 255, 255, 0.09);
}

.viewer-account-menu-btn:focus {
  outline: none;
}

.viewer-account-menu-btn:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.7);
}

.viewer-account-menu-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

/* Logout red text */
.viewer-logout-btn {
  color: rgb(255, 120, 120);
}

/* Light mode */
[data-theme="light"] .viewer-account-card {
  color: #ffffff;
}

[data-theme="light"] .viewer-account-card:hover,
[data-theme="light"] .viewer-account-card.active {
  background: rgba(255, 255, 255, 0.12);
}

[data-theme="light"] .viewer-account-menu {
  background: rgb(55, 69, 76);
  border-color: rgba(255, 255, 255, 0.22);
}

[data-theme="light"] .viewer-account-email {
  color: rgba(255, 255, 255, 0.65);
  border-bottom-color: rgba(255, 255, 255, 0.16);
}

[data-theme="light"] .viewer-account-menu-btn {
  color: #ffffff;
}

[data-theme="light"] .viewer-account-menu-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

[data-theme="light"] .viewer-logout-btn {
  color: rgb(255, 150, 150);
}





/* ######################################
    2rd Part: Project & Image History
###################################### */

/* Main Settings */
.image-history-container {
    flex: 1 1 auto;
    min-height: 0;

    overflow-y: auto;
    overflow-x: hidden;

    position: relative;
    z-index: 1;

    background: var(--bg-left-middle);
    padding: 12px 0;
    box-sizing: border-box;
}
/* Scrollbar Styles */
/* Chrome, Safari */
.image-history-container::-webkit-scrollbar {
    width: 3px;
    height: 3px;
}
.image-history-container::-webkit-scrollbar-thumb {
    background-color: var(--scrollbar-thumb);
    border-radius: 10px;
    border: 2px solid var(--scrollbar-track);
}
.image-history-container::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
}
/* Firefox */
.image-history-container {
    scrollbar-width: thin;                       
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}
/* Sidebar section toggle */
.sidebar-section-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;

    width: 100%;
    min-height: 40px;
    padding: 10px 16px 6px 20px;

    border: none;
    color: var(--text-history-item);
    font-family: 'PingFangHKWeb', sans-serif;
    font-size: 16px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;

    position: relative;
    top: auto;
    z-index: 1;
    background: transparent;
}
.sidebar-section-toggle:hover{
    opacity: 0.9;
}
.sidebar-section-title{
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: none;
}
.sidebar-section-chevron{
    font-size: 18px;
    line-height: 1;
    transition: transform 0.2s ease;
    pointer-events: none;
}
.sidebar-section-toggle.collapsed .sidebar-section-chevron{
    transform: rotate(-90deg);
}





/* ###########################
        3rd Part: Bottom
########################### */

/* Bottom container */
.left-container-bottom {
    display: flex;
    flex-direction: column;

    width: 100%;
    flex: 0 0 auto;

    position: relative;
    z-index: 2;

    overflow: visible;

    background: var(--bg-left-bottom);
    box-sizing: border-box;
}
/* ===================================
   Four bottom action buttons
=================================== */
.left-bottom-actions {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    grid-template-rows: repeat(3, 34px);
    gap: 4px 10px;

    width: 100%;
    min-height: 0;
    padding: 8px 14px 4px;
    box-sizing: border-box;
}
.left-bottom-action-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;

    position: relative;
    overflow: visible;

    width: 100%;
    min-width: 0;
    height: 34px;

    margin: 0;
    padding: 0;
    gap: 10px;

    font-family: 'PingFangHKWeb', sans-serif;
    color: white;

    background: transparent;
    border: none;
    border-radius: 5px;

    cursor: pointer;
    box-sizing: border-box;

    transition:
        background-color 0.15s ease,
        opacity 0.15s ease,
        transform 0.15s ease;
}
/* ReadMe */
.left-bottom-actions > .readme-btn {
    grid-column: 1;
    grid-row: 1;

    width: 36px;
    justify-self: start;
    justify-content: flex-start;
}

/* Demo */
.left-bottom-actions > .demo-btn {
    grid-column: 2;
    grid-row: 1;

    width: 36px;
    justify-self: start;
    justify-content: flex-start;

    left: -2px;
}

/* Website Page Views */
.left-bottom-actions > .processed-count-btn:nth-child(3) {
    grid-column: 1 / -1;
    grid-row: 2;
}

/* Images Processed Count */
.left-bottom-actions > .processed-count-btn:nth-child(4) {
    grid-column: 1 / -1;
    grid-row: 3;
}

/* Spacing between the statistics icon and number matches the grid column gap */
.left-bottom-actions > .processed-count-btn {
    justify-content: flex-start;
    gap: 10px;
}

/* Icon container width matches the first Grid column */
.left-bottom-actions .bottom-action-icon-wrapper {
    width: 36px;
    height: 34px;
    flex: 0 0 36px;
}
/* Hover effect */
.left-bottom-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}
/* Mouse click effect */
.left-bottom-action-btn:active {
    transform: scale(0.95);
}
/* Keyboard focus */
.left-bottom-action-btn:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.75);
    outline-offset: -2px;
}
/* Bottom button tooltip */
.bottom-action-tooltip {
    position: fixed;

    top: var(--tooltip-y);
    left: calc(var(--tooltip-x, 200px) + 8px);

    display: block;

    width: max-content;
    max-width: none;

    padding: 7px 11px;

    background: rgb(112, 112, 112);
    color: white;

    border-radius: 7px;

    font-family: 'PingFangHKWeb', sans-serif;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.2;
    white-space: nowrap;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    z-index: 10000;

    transform: translateY(-50%);
    transition:
        opacity 0.15s ease,
        visibility 0.15s ease;
}
.left-bottom-action-btn:hover .bottom-action-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Icon container */
.bottom-action-icon-wrapper {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 36px;
    height: 34px;

    flex: 0 0 36px;
}

/* Icon position and sizing */
.bottom-action-icon {
    display: block;
    position: absolute;

    top: 50%;
    left: 50%;

    width: 32px;
    height: 32px;

    transform: translate(-50%, -50%);

    object-fit: contain;
    object-position: center;

    pointer-events: none;
    user-select: none;
}

/* Dark mode icon */
.bottom-icon-dark {
    display: block;
}

.bottom-icon-light {
    display: none;
}

/* Light mode icon */
[data-theme="light"] .bottom-icon-dark {
    display: none;
}

[data-theme="light"] .bottom-icon-light {
    display: block;
}

/* Count below icon */
.bottom-action-count {
    display: block;

    width: auto;
    min-width: 0;
    min-height: 0;

    margin: 0;

    font-size: 15px;
    font-weight: 500;
    line-height: 20px;
    text-align: left;

    color: white;

    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}


/* Light mode button/count appearance */
[data-theme="light"] .left-bottom-action-btn {
    color: white;
}
[data-theme="light"] .left-bottom-action-btn:hover {
    background: rgba(255, 255, 255, 0.13);
}
[data-theme="light"] .bottom-action-count {
    color: white;
}
/* Demo and ReadMe only contain icons */
.demo-btn,
.readme-btn {
    justify-content: center;
}
/* Reset previous Demo image styles */
#demo-preview-img {
    margin: 0;
    cursor: pointer;
}

/* -----Dark/Light Mode Toggle----- */
.theme-toggle-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;

    width: 100%;
    height: 40px;

    margin: 0;
    padding: 0 20px 0 14px;
    gap: 10px;

    box-sizing: border-box;

    font-family: 'PingFangHKWeb', sans-serif;
    font-size: 14px;
    color: white;
}
#theme-mode-text {
    width: auto;
    height: auto;

    font-weight: 300;
    line-height: 20px;
    text-align: left;
    white-space: nowrap;
}
.theme-switch {
    display: inline-block;
    position: relative;

    width: 64px;
    height: 16px;

    flex: 0 0 64px;
    margin: 0;
}
.theme-switch input {
    position: absolute;

    opacity: 0;
    width: 0;
    height: 0;
}
.theme-switch .slider {
    display: block;
    position: relative;

    width: 100%;
    height: 100%;

    background: #747474;
    border-radius: 999px;

    cursor: pointer;
    transition: background-color 0.3s;
}
.theme-switch .slider::before {
    content: "";
    position: absolute;

    width: 22px;
    height: 16px;

    left: 0;
    top: 0;

    background: #bdbdbd;
    border-radius: 999px;

    transition: transform 0.3s;
}
.theme-switch input:checked + .slider {
    background: #747474;
}
.theme-switch input:checked + .slider::before {
    transform: translateX(42px);
}
.theme-switch input:focus-visible + .slider {
    outline: 2px solid white;
    outline-offset: 3px;
}






































ReadMe Page
.readme-btn-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.readme-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.35);
    backdrop-filter: blur(8px); 
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    z-index: 9999;
    overflow: auto;
}
.readme-header {
    position: sticky;
    top: 0;
    width: 1500px; 
    height: 25px;
    display: flex;
    justify-content: flex-end;
    padding: 10px;
    background: rgb(60,60,60);
    z-index: 10001;
}
.readme-box {
    background: white;
    padding: 0;                  
    display: inline-block;          
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    margin-top: 0px;
    width: min(90vw, 1500px);
    height: min(100vh, 1000px);
    max-width: 1500px;
    max-height: 1000px;
    overflow: hidden;
}
.readme-box img {
    display: block;
    margin: 0 auto;
    width: 100%;     
    height: auto;
    object-fit: contain;
}
.readme-content {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}
#readme-close-btn {
    background: #444;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 12px;
    width: 25px;
    height: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
#readme-close-btn:hover {
    background: white;
    color: black;
    border: 1px solid #444;
}
#readme-popout-btn {
    background: #444;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 12px;
    width: 25px;
    height: 25px;
    cursor: pointer;
    margin-right: 10px;
}
#readme-popout-btn:hover {
    background: white;
    color: black;
    border: 1px solid #444;
}
#readme-iframe {
  width: 100%;
  height: 100%;
  border: none;
}
/* try on */
.try-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    background: none;
    border: none;
}
#try-icon1 {
    width: 160px;
    height: 40px;
    margin: 0px 29px 0px 11px;
}
#try-icon2 {
    width: 124.8px;
    height: 40px;
    margin: 0px 37.6px 10px 37.6px;
}