body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #ffffff;
    color: #333;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.full-width-section { padding: 0; }
.full-width-section.content { padding: 0 0px; flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.full-width-section.header { flex: 0 0 auto; }

.container {
    display: flex;
    overflow: hidden;
    position: relative;
    flex: 1;
}

.sidebar {
    width: 250px;
    max-width: 250px;
    min-width: 0;
    height: 100%;
    background-color: #f9f9f9;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: width 0.3s, max-width 0.3s, padding-left 0.3s, padding-right 0.3s;
    padding-top: 20px; /* Fixed to maintain vertical alignment */
    padding-bottom: 20px; /* Fixed to maintain vertical alignment */
    padding-right: 15px;
    overflow-x: hidden;
    overflow-y: auto; /* Enable vertical scrolling */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling for touch devices */
    box-sizing: border-box; /* Ensure padding does not cause overflow */
}

.sidebar.collapsed {
    width: 50px;
    max-width: 50px;
    padding-left: 0; /* Smoothly remove left padding */
    padding-right: 0; /* Smoothly remove right padding */
}

.menu {
    list-style: none;
    padding: 0;
    margin: 0;
    width: calc(100% - 40px); /* Ensure content stays within padding */
    opacity: 1;
    transition: opacity 0.3s;
}

.sidebar.collapsed .menu-item {
    border-radius: 0;
    margin: 0px -24px;
}


.menu-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    font-size: 16px;
    color: #333;
    text-align: left;
    cursor: pointer;
    border-radius: 10px;
    position: relative;
    transition: background-color 0.2s;
    user-select: none;
    white-space: nowrap;
    margin: 0 0;
    transition: all 0.3s;
}

.menu-item:after {
    content: "";
    width: calc(100% - 40px);
    margin-left: 20px; margin-right: 20px;
    height: 1px;
    position: absolute;
    left: 0;
    bottom: -1px;
    border-bottom: 1px solid #dddddd;
}

.menu-item:hover, .menu:not(:hover) .menu-item.active {
    background-color: #eeeeee;
    color: #000;
    box-shadow: 0 0 0 2px #dddddd;
}

.menu-item i {
    margin-right: 15px;
    font-size: 18px;
    color: #444;
}

.main-content {
    flex: 1;
    padding: 0px 40px;
    overflow: auto;
    position: relative;
    background-color: #eeeeee;
}

.main-content-section {
    padding-top: 10px;
    padding-bottom: 40px;
    display: flex;
    flex-direction: column;
}

.main-content-section h1 {
    margin-bottom: 20px;
}

.logo-controls {
    display: flex;
    gap: 10px;
    margin: 10px 0;
}

.logo-controls button {
    background-color: #007aff;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 5px 10px;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s;
    white-space: nowrap; /* Ensure text does not wrap */
}

.logo-controls button:hover {
    background-color: #005bb5;
}

@keyframes blink {
     0%, 100% { filter: brightness(0.9); }
     50% { filter: brightness(1); }
}

.blinking {
    animation: blink 2s infinite;
}

#status-message { grid-column: 2; grid-row: 1; line-height: 60px; text-align: right; margin-right: 10px; justify-self: end;  }
#admin-buttons { display: none; line-height: 40px; grid-column: 3; grid-row: 1; margin: 10px; justify-self: end; text-align: right; }
#debug { cursor: default; font-size: 14px; border: 2px solid #ffffff; padding: 10px; }
#debug div { white-space: pre-wrap; word-wrap: break-word; font-family: monospace; }

.status {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 20px 0;
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
#status, #whoami { z-index: 10; } 
#status1, #status2, #whoami { overflow-x: auto; min-height: 110px; }

.status thead { background-color: #dddddd; color: #fff; text-align: left; }
.status th, .status td { padding: 12px; text-align: left; white-space: nowrap; }
.status th { background-color: #dddddd; }
.status tbody tr { border-bottom: 1px solid #e0e0e0; }
.status tbody tr:nth-child(even) { background-color: #f5f5f5; }
.status tbody tr:hover { background-color: #cccccc; }
.status th { font-size: 14px; letter-spacing: 0.05em; }
.status td { font-size: 16px; }

.color-yellow { color: #fdff6e;  }


.form input:not([type="radio"]), .form textarea, .form select { color: #000000; width: 100%; min-height: 55px; box-shadow: 0 0 2px 1px #4848481c; padding: 0px 13px; font-size: 16px; border: 1px solid #ccc; border-radius: 5px; outline: none; background-color: #fff; }
.form input[type="radio"] { min-height: 24px; outline: none; margin: 0; }
.form textarea { resize: vertical; display: flex; }
.form select { appearance: none; cursor: pointer; background-image: url('../visual/icons/chevron-down.svg'); background-repeat: no-repeat; background-position: right 12px center; background-size: 12px; padding-right: 30px; }
.form input::placeholder, .form textarea::placeholder { color: #aaaaaa; }

.form input:not([type="radio"]):focus, .form textarea:focus, .form select:focus,
.form input:not([type="radio"]):hover, .form textarea:hover, .form select:hover { box-shadow: 0 0 0px 1px #52a3ff; }
.edit-group { max-width: 1200px; }
.edit-group .form { margin-bottom: 0px; padding: 0 0px; min-width: 450px; }
.shipping-rules.edit-group .form { min-width: unset; }
.form label { padding-left: 4px; }
small { font-size: 14px; color: #999; margin: 4px 0 15px 4px; position: relative; top: -3px; display: block;}
.group-header { padding: 15px 30px; cursor: pointer; }

.logo-image img, .hero-image img, .item-image img { border-radius: 10px; transition: all .3s; }

.logo-image, .hero-image, .item-image { transition: all 0.3s; user-select: none; }
.dragover { transform: scale(1.02); opacity: 0.5; }

.item-image { min-width: 100px; position: relative; }
.item-image { transform: scale(1.02); display: flex; overflow: hidden; border: 1px solid #dddddd; box-shadow: 0 0 8px 0 #00000011; border-radius: 10px; }
.item-image:hover img { transform: scale(1.04); }
.item-image img { width: 100%;  }
.item-detail-image img { width: 100%; }

.currency-input-container { background-color: transparent; }
.currency-placeholder { overflow: hidden; white-space:nowrap; user-select: none; pointer-events: none; position: absolute; left: 0; top: 0px; display: flex; align-items: center; height: 55px; padding: 0 14px; width: calc(100% - 30px); }

.infobox { position: relative; max-width: 1200px; border: 1px solid #999; background-color: #fefefe; padding: 25px; border-left: 6px solid #999; border-radius: 6px; margin-bottom: 40px; }
.infobox .text-after-icon { display: inline-block; width: calc(100% - 85px); }
.infobox .icon-before-text { display: inline-block; margin-top: 6px; width: 65px; vertical-align: top; }
.hoverselect { cursor: copy; }

.items-table { max-width: 1200px; transition: all 0.4s; }
.items-table .row { position: relative; display: grid; grid-template-columns: repeat(1, 1fr); max-width: 1200px; box-shadow: 0 0 0 1px #999; background-color: #fefefe; border-radius: 6px; border-left: 6px solid transparent; margin-top: 10px; transition: all 0.4s; }
.items-table .col { padding-top: 10px; }
.items-table .col:first-child { padding-top: 5px; }
.items-table img { max-width: 60px; height: auto; border-radius: 6px; margin: 0 20px 0 0; }
.items-table .row { padding: 10px 25px; display: grid; grid-template-columns: auto 1fr auto;}
.ratingstars { color: #ffb300; white-space: nowrap; }

.items-table .row:hover { background: linear-gradient(to bottom, #efefef, #efefef) !important; border-left: 6px solid #999; cursor: pointer; }
.items-table .row.active { background: linear-gradient(to bottom, #ffffff, #efefef); border-left: 6px solid #999; }

.edit-removes-rating-warning-icon { font-size: 12px; margin-right: 3px; color: #ff000082; }

.items-table.compact { margin-top: 20px; }
.items-table.compact .row { grid-template-columns: 1fr auto; padding: 0; margin: 0; border-radius: 0; gap: 16px; }
.items-table.compact .row:first-child { border-radius: 5px 5px 0 0; }
.items-table.compact .row:last-child { border-radius: 0 0 5px 5px; }
.items-table.compact .col { padding: 5px 10px; }
.items-table.compact .title { font-size: 15px; }
.items-table.compact .price { font-size: 16px; margin-right: 20px; }
.items-table.compact .col1 { display: none; }
.items-table.compact .col3 { display: flex; align-items: baseline; margin: 0 10px; }
.items-table.compact .iteminfo { display: none !important; }
.items-table.compact del { display: none; }
.newitembtn { flex-basis: 0; flex-grow: 0 !important; padding: 10px 20px; cursor: pointer; }
.item-description, .welcometext { height: 300px; }

.download-progress { position: absolute; font-size: 30px; left: 0px; width: 130px; text-align: center; top: 54px; }
.edit-item-backbtn { cursor:pointer; }

.countries-list, .countries-list option, #country-disabled-copy, .utf-flag {
    font-family: "TwemojiCountryFlags", "Poppins", sans-serif;
}
#country-disabled-copy { opacity: 0.5; }

@media (hover: hover) {
   .copy-shipping-rule { cursor: pointer; opacity: 0.1; }
   .remove-shipping-rule { cursor: pointer; opacity: 0.1; }
}

.shipping-rules .save-section:hover + .save-section .copy-shipping-rule { opacity: 1; }
.shipping-rules .save-section:hover + .save-section .remove-shipping-rule { opacity: 1; }
.shipping-rules .save-section:hover .copy-shipping-rule { opacity: 1; }
.shipping-rules .save-section:hover .remove-shipping-rule { opacity: 1; }

.shipping-rules .save-section:first-child:nth-last-child(2) + .save-section .remove-shipping-rule { opacity: 0.1; pointer-events: none; }
.shipping-rules .save-section:first-child:nth-last-child(2) + .save-section:hover .remove-shipping-rule { opacity: 0.3; }

.priceamount { white-space:nowrap; }

.paymentqr { display: flex; min-width: 200px; resize: both; aspect-ratio: 1 / 1; background-color: #ffffff; }
.paymentdetails { max-width: unset; min-width: unset; width: 100%; }
.paymentqr > * { display: flex; flex: 1; }
.copypd, .toggleqr, #paymentqrcode canvas { cursor: pointer; user-select: none; }
.copypd { font-size: 14px; }
.paymentdetails > input { margin-bottom: 10px;}

.order-row { cursor: pointer; }
.order-row, .order-row-single { background-color: #fbfbfb; padding: min(3vw, 20px); border: 1px solid #ddd; border-radius: 10px; }
.order-row-single { padding: 40px; }
.orders-item-image { margin-right: 5px; }
.order-row:hover, .order-row-single { background-color: #fff; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); }
.order-row:last-child { margin-bottom: 20px; }

.cart-item-image { margin: 10px; border-radius: 7px; min-width: unset; width: 60px; box-shadow: unset; }
.cart-item-image img { width: 100%; max-width: 60px; cursor: pointer; }



@media(max-width: 1405px) {
    .shipping-rules .save-section:nth-child(2n) { margin-bottom: 20px; }
    .grid-5x1 { grid-template-columns: repeat(4, 1fr); }
}

@media(max-width: 1200px) {
    .grid-5x1 { grid-template-columns: repeat(3, 1fr); }
}

@media(max-width: 992px) {
    .grid-5x1 { grid-template-columns: repeat(3, 1fr); }
}

@media(max-width: 768px) {
    .grid-4x1 { grid-template-columns: repeat(2, 1fr); }
    .grid-5x1 { grid-template-columns: repeat(2, 1fr); }
    .header-wrapper { padding: 13px 0 10px 0; }
    .header-wrapper.small { margin: 0 25px; }
    .edit-group .form { min-width: 100%; }
    .main-content { padding: 0 3vw; }

    .shipping-rules .form { flex-wrap: wrap; flex-direction: column; }
    .shipping-rules .miw-350 { min-width: unset; width: calc(90vw - 10px); flex-grow: 1; }
    .shipping-rules .miw-320 { min-width: unset; width: calc(90vw - 10px); flex-grow: 1; }
    .shipping-rules .miw-240 { min-width: unset; width: calc(90vw - 10px); flex-grow: 1; }
    .shipping-rules .miw-130 { min-width: unset; width: calc(90vw - 10px); flex-grow: 1; }   
}

@media(max-width: 576px) {
    .items-table.compact .row { grid-template-columns: 1fr; gap: 0; }
    .items-table.compact .col { padding: 0px 10px; }
    .items-table.compact .col2 { padding: 5px 10px 0 10px; }
    .items-table.compact .col3 { padding: 0 10px 5px 10px; justify-content: end; }
    .header-wrapper.small { margin: 0 15px; }
    .header-wrapper > :first-child { order: 0; }
    .header-wrapper > :nth-child(2) { order: 2; width: 100%; }
    .header-wrapper > :last-child { order: 1; }
}


/* dark mode */

body.dark { color: #dfdfdf; }
body.dark .checkbox-around { border: 1px solid #545454; background-color: #5a5a5a; }
body.dark .sidebar { background-color: #2a2a2a; }
body.dark .menu-item { color: #d9d9d9; }
body.dark .menu-item:after { border-bottom: 1px solid #545454; }
body.dark .menu-item:hover, body.dark .menu:not(:hover) .menu-item.active { background-color: #545454; color: #e9e9e9; box-shadow: 0 0 0 2px #545454; }
body.dark .menu-item i { color: #dbdbdb; }

body.dark .main-content { background-color: #1a1a1a; }
body.dark .form input:not([type="radio"]), body.dark .form textarea, body.dark .form select { color: #dfdfdf; border: 1px solid #545454; background-color: #545454; }
body.dark .form select option:disabled { color: #dddddd; }
body.dark .form input::placeholder, body.dark .form textarea::placeholder { color: #888888; }
body.dark .form input:not([type="radio"]):focus, body.dark .form textarea:focus, body.dark .form select:focus,
body.dark .form input:not([type="radio"]):hover, body.dark .form textarea:hover, body.dark .form select:hover { box-shadow: 0 0 0px 1px #000000; }

body.dark .wysiwyg-editor:focus { box-shadow: 0 0 0px 1px #000000 !important; }
body.dark .store-details { background-color: #444444aa; }

body.dark .infobox { background-color: #545454; border: 1px solid #1a1a1a; }
body.dark .order-row { background-color: #2c2c2c; border: 1px solid #1a1a1a; }
body.dark .order-row:hover { background-color: #545454; }
body.dark .items-table .row { box-shadow: 0 0 0 1px #000000; background-color: #323232; }
body.dark .items-table .row:hover { background: linear-gradient(to bottom, #646464, #262626) !important; }
body.dark .items-table .row.active { background: linear-gradient(to bottom, #5a5a5a, #5a5a5a); }
body.dark .item-detail-text { color: #eeeeee; background-color: #161616bb; }
body.dark .item-image { border: 1px solid transparent; }
body.dark .status { background-color: #1d1d1d; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); }
body.dark .status thead { background-color: #353535; color: #fff; text-align: left; }
body.dark .status th { background-color: #353535; }
body.dark .status tbody tr { border-bottom: 1px solid #242424; }
body.dark .status tbody tr:nth-child(even) { background-color: #252525; }
body.dark .status tbody tr:hover { background-color: #6b6b6b; }
body.dark .wysiwyg-toolbar { background-color: #c9c9c9; }
body.dark .wysiwyg-toolbar i { background-color: #4c4c4c; }
body.dark .wysiwyg-toolbar i:hover { background-color: #8b8b8b; }
body.dark .wysiwyg-toolbar:after { border-top: 11px solid #c9c9c9;}

body.dark .modal-content { background: #3e3e3e; }
body.dark .modal-close { color: #b9b9b9; }
body.dark .modal-title { background-color: #2e2e2e; border-bottom: 1px solid #181818; }
body.dark #qrcode { background-color: #dddddd; padding: 10px; }
body.dark .waitcircle path { fill: #eeeeee; }

body.dark .cart-item { background-color: #5b5b5b; border: 1px solid #000000; }

.dark-mode-toggle .make-mode-dark { display: none; cursor: pointer; }
.dark-mode-toggle .make-mode-light { display: inline; cursor: pointer; }

body.dark .dark-mode-toggle .make-mode-dark { display: inline; }
body.dark .dark-mode-toggle .make-mode-light { display: none; }
body.dark del::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cline x1='10' y1='90' x2='90' y2='10' stroke='%23dddddd' stroke-width='4'/%3E%3C/svg%3E"); }

body.dark textarea::-webkit-resizer { background: #545454;}

body.dark .backupoptions,
body.dark .orders-container,
body.dark .order-details,
body.dark .orders-list,
body.dark .emptycartmessage,
body.dark .cart-subtotal-container,
body.dark .cart-total-container,
body.dark .cart-shipping-container,
body.dark .cart-overview-container,
body.dark .cart-address-container { background-color: #3b3b3bcc;}

body.dark .order-payment-status { box-shadow: inset 0 0 2px 0px #ffffff55;}
body.dark .bg-success { background-color: #316e33; color: #eeeeee; }
body.dark .bg-danger { background-color: #b54e4b; color: #eeeeee; }
body.dark .bg-warning { background-color: #8b6735; color: #eeeeee; }

body.dark .order-actions-menu { color: #eeeeee; background: #1a1a1a; } 
body.dark .order-actions-menu-item.hover:hover { background-color: #666666; }
body.dark .order-detail-bar { background-color: #242424; }
body.dark .order-row-single { background-color: #242424; }

body.dark .finances-box { background-color: #3b3b3bcc; border: 1px solid #3b3b3b; }

body.dark .cart-carrier-option { border: 1px solid #3b3b3b; background-color: #545454; }
body.dark .cart-carrier-option:hover { border-color: #a1a1a1; }
body.dark .cart-progress-container .steps li { background: #5b5b5b; }
body.dark .paymentdetails { background-color: #333333; }

body.dark *::-webkit-scrollbar-track { background-color: #3b3b3b; }
body.dark *::-webkit-scrollbar-track:hover { background-color: #3b3b3b; }
body.dark *::-webkit-scrollbar-thumb { background: #141414; border: 2px solid #383838;  }
body.dark *::-webkit-scrollbar-thumb:hover { background: #191919; }

