/* QuickPix editor chrome. The editing canvas and document colors are untouched. */
:root,
body,
body.theme-light,
body.theme-dark,
body.theme-green {
  --background: #e9e9e7;
  --text-color: #303b4d;
  --text-color-muted: #738095;
  --text-color-red: #be4147;
  --text-color-green: #26795a;
  --text-color-blue: #2766ce;
  --link-color: #2766ce;
  --section-background-color: #fff;
  --area-background-color: #f4f6f9;
  --block-background-color: #fff;
  --header-background-color: #f7f8fa;
  --button-background-color: #fff;
  --button-background-color-hover: #edf3ff;
  --button-background-color-active: #e5edfc;
  --button-text-color-active: #245fc7;
  --button-shadow-color: transparent;
  --button-border-radius: 5px;
  --button-toggle-background-color: #edf0f5;
  --button-toggle-background-color-hover: #dfe8f9;
  --input-background-color: #fff;
  --input-background-color-hover: #f6f8fc;
  --input-text-color: #303b4d;
  --input-border-color: #d9dfe8;
  --input-border-color-active: #628adc;
  --input-border-radius: 4px;
  --input-group-border-color: #d9dfe8;
  --menu-background-color: #fff;
  --menu-text-color: #475368;
  --menu-icons-filter: invert(27%) sepia(15%) saturate(700%) hue-rotate(178deg);
  --menu-icons-filter-active: invert(34%) sepia(90%) saturate(1220%) hue-rotate(199deg);
  --menu-dropdown-background-color: #fff;
  --menu-dropdown-border-color: #dce1e9;
  --menu-dropdown-text-color: #303b4d;
  --menu-dropdown-text-muted-color: #8b95a6;
  --menu-dropdown-hover-background-color: #edf3ff;
  --menu-dropdown-hover-text-color: #245fc7;
  --menu-dropdown-divider-color: #edf0f4;
  --background-color-active: #e8effd;
  --background-color-hover: #f0f4fa;
  --text-color-active: #245fc7;
  --border-color: #dfe3e9;
  --scrollbar-track-color: #f6f7f9;
  --scrollbar-thumb-color: #c5cdd8;
  --mobile-menu-toggle-filter: none;
  color-scheme: light;
}

html { font-size: 10px; }
body {
  padding: 38px 0 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Malgun Gothic", "Apple SD Gothic Neo", Arial, sans-serif;
  font-size: 13px;
  color: #303b4d;
  background: #e9e9e7;
}
button, input, select, textarea { font: inherit; }
button, input[type="button"] { box-shadow: none; transition: background-color .12s, border-color .12s; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid #7b9ee2;
  outline-offset: 2px;
}
input[type="text"], input[type="number"], select, textarea { font-size: 13px; }
input[type="checkbox"], input[type="radio"], input[type="range"] { accent-color: #3374d9; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track-piece { background: #f5f6f8; }
::-webkit-scrollbar-thumb { background: #c5ccd7; border: 2px solid #f5f6f8; border-radius: 5px; }

.wrapper { top: 38px; bottom: 0; }
.main_menu { z-index: 100; border-bottom: 1px solid #e7eaf0; }
.main_menu li[hidden] { display: none !important; }
.main_menu > ul.menu_bar { height: 38px; padding-left: 12px; gap: 2px; }
.main_menu > ul.menu_bar > li > a { padding: 0 13px; font-size: 14px; font-weight: 500; }
.main_menu > ul.menu_dropdown {
  min-width: 218px;
  padding: 6px;
  border: 1px solid #dce1e9;
  border-radius: 7px;
  box-shadow: 0 8px 24px #2638551c;
}
.main_menu > ul.menu_dropdown > li > a { height: 34px; line-height: 34px; padding: 0 10px; font-size: 13px; border-radius: 4px; }
.main_menu > ul.menu_dropdown > li > hr { margin: 5px 3px; }
.main_menu .shortcut { padding-left: 22px; font-size: 11px; }

.submenu { margin-bottom: 0; padding: 3px 12px 3px 8px; min-height: 48px; border-bottom: 1px solid #dfe3e9; }
.submenu .logo { display: none; }
.attributes {
  width: 100%;
  flex: 1;
  background: transparent;
  padding: 4px 4px;
  margin: 0 !important;
  min-height: 38px;
  border-radius: 0;
}
.attributes .item { margin-right: 20px; min-height: 30px; }
.attributes .item > label { color: #69778b; font-size: 12px; }
.attributes input[type="number"] { min-height: 28px; width: 66px; }
.attributes select { min-height: 28px; max-width: 180px; }
.attributes button:not(.ui_icon_button) { min-height: 28px; }
.attributes .ui_button_group { align-items: center; }

.sidebar_left {
  width: 52px;
  padding: 7px 5px;
  margin: 0;
  height: 100%;
  max-height: 100%;
  align-self: stretch;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: center;
  gap: 3px;
  border-right: 1px solid #dfe3e9;
  background: #fff;
  scrollbar-width: thin;
}
.sidebar_left .item {
  flex: 0 0 34px;
  width: 36px;
  height: 34px;
  min-height: 34px;
  margin: 0;
  border: 1px solid transparent;
  border-radius: 5px;
  background-color: transparent;
}
.sidebar_left .item:hover { background-color: #f1f5fc; border-color: #e5ebf6; }
.sidebar_left .item.active { background-color: #eaf1ff; border-color: #c4d6f4; }
.sidebar_left .item:after { background-size: 20px 20px; }
.sidebar_left .item:focus-visible { outline: 2px solid #7b9ee2; outline-offset: 0; }
.sidebar_left #media { display: none !important; }

.middle_area {
  min-width: 0;
  background-color: #e9e9e7;
  background-image: radial-gradient(#d3d5d7 0.65px, transparent 0.65px);
  background-size: 14px 14px;
}
.main_wrapper { margin: 0; }
.loaded .canvas_wrapper #canvas_minipaint { border-color: #c9ced5; box-shadow: 0 4px 20px #313b4d14; }
.ruler_left, .ruler_top { background: #f5f6f8; }

.sidebar_right {
  width: 252px;
  margin: 0;
  padding: 0;
  background: #fff;
  border-left: 1px solid #dfe3e9;
  overflow-y: auto;
  scrollbar-width: thin;
}
.sidebar_right .block {
  margin: 0;
  border: 0;
  border-bottom: 1px solid #e4e8ee;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}
.sidebar_right .block h2 {
  min-height: 36px;
  padding: 9px 14px;
  font-size: 12px;
  line-height: 18px;
  font-weight: 650;
  letter-spacing: .1px;
  border: 0;
  border-radius: 0;
  background: #f9fafb;
  color: #4a586d;
}
.sidebar_right .block h2.toggle:before { top: 16px; right: 14px; }
.sidebar_right .block .content { padding: 10px 12px; }
.sidebar_right .preview .canvas_preview_wrapper { margin: 10px auto 7px; width: calc(100% - 24px); }
.canvas_preview_details { padding: 0 12px 10px; }
.sidebar_right #toggle_info { font-size: 12px; color: #6c788b; }
.sidebar_right .label { color: #6b778a; font-size: 12px; }
.block.details .row { min-height: 29px; margin-bottom: 5px; }
.block.details input[type="number"] { width: 78px; min-height: 27px; padding: 3px 6px; }
.block.details button, .block.details select { height: 27px; }
.block.details .ui_color_input { width: 78px; }
.block.details .ui_color_input input { height: 27px; }
.block.details button.reset { width: 25px; border-color: #e1e5ec; }
.details-content { height: 185px; }
.color_area { border-color: #d4dce8; border-radius: 5px; }
.ui_color_sample { box-shadow: none; border-color: #d4dce8; border-radius: 4px; }

.layers_list { margin-top: 11px; }
.layers_list .item { min-height: 34px; margin-bottom: 3px; padding: 3px; border-radius: 4px; }
.layers_list .item.active { background: #edf3ff; }
.layers_list .layer_name { height: 28px; line-height: 24px; padding: 1px 6px; background: #f6f8fb; border-color: transparent; font-size: 13px; }
.layers_list .item.active .layer_name { background: transparent; color: #245fc7; font-weight: 550; }
.layers_list .visibility { height: 28px; width: 22px; }
.layers_list .visible { opacity: .65; }
.layers_list .delete { height: 28px; width: 14px; }
.layers_list .arrow_down { height: 28px; }
.layer_add, .layers_arrow { min-height: 27px; line-height: 23px; padding: 1px 9px; border-radius: 4px; }
.layer_add { color: #245fc7; background: #edf3ff; border-color: #d3e0f6; font-weight: 600; }
.layers_arrow { background: #fff; }
.sidebar_right .block.layers { min-height: 180px; }

#popups { z-index: 110; }
#popups .popup {
  border-radius: 10px;
  border: 1px solid #dde3ec;
  background: #fff;
  font-size: 14px;
  box-shadow: 0 0 0 4000px #25344d4d, 0 16px 60px #172b4a33;
}
#popups .popup h2 { font-size: 16px; font-weight: 650; padding: 0 18px; background: #f8f9fb; border-bottom: 1px solid #e8ebf0; }
#popups .popup .dialog_content { padding: 18px; }
#popups .popup th { padding: 8px 12px 8px 0; font-size: 13px; color: #617087; }
#popups .popup input[type="text"], #popups .popup input[type="number"], #popups .popup select { min-height: 32px; }
#popups .popup .buttons { background: #fafbfd; border-top-color: #e6ebf2; }
#popups .popup .button { min-width: 74px; min-height: 31px; padding: 5px 14px; }
#popups .popup .button[type="submit"] { background: #3374d9; border-color: #3374d9; color: #fff; }
#popups .popup .close { color: #7d889b; width: 25px; height: 25px; margin: 7px 10px; border-radius: 4px; }
.quickpix-local-notice { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); max-width: calc(100% - 32px); padding: 10px 16px; background: #263a57; color: #fff; border-radius: 6px; z-index: 2000; box-shadow: 0 6px 22px #172b4a22; font-size: 13px; }
.alertify-notifier .ajs-message { border-radius: 6px; border: 1px solid #dfe5ee; background: #fff; color: #34455d; box-shadow: 0 5px 20px #172b4a1a; }
.alertify-notifier .ajs-message.ajs-success { background: #eef7f2; color: #276747; border-color: #cde3d5; }
.alertify-notifier .ajs-message.ajs-error { background: #fff3f2; color: #aa3e3e; border-color: #f0d5d2; }

@media (max-width: 1050px) {
  .sidebar_right { width: 228px; }
  .main_menu > ul.menu_bar > li > a { padding: 0 10px; }
}
@media (max-width: 700px) {
  body { padding-top: 44px; }
  .wrapper { top: 44px; }
  .main_menu > ul.menu_bar { height: 44px; padding: 0 44px; overflow-x: auto; gap: 0; }
  .main_menu > ul.menu_bar > li { flex-shrink: 0; }
  .main_menu > ul.menu_bar > li > a { font-size: 13px; padding: 0 9px; }
  .left_mobile_menu, .right_mobile_menu { width: 44px; height: 44px; background: #fff; }
  .left_mobile_menu:after, .right_mobile_menu:after { background-size: 21px auto; }
  .sidebar_left { left: -60px; top: 0; }
  .sidebar_right { right: -252px; width: 252px; }
  .sidebar_left.active, .sidebar_right.active { box-shadow: 0 6px 20px #2a3c5a26; }
  .submenu { padding: 3px 5px; min-height: 45px; }
  .attributes .item { margin-right: 14px; }
  .undo_button { width: 35px; height: 35px; margin-left: 2px; flex: 0 0 35px; background-size: 21px; }
  #popups .popup { top: 5vh; max-height: 90vh; }
  #popups .popup .dialog_content { max-height: calc(90vh - 10rem); padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; }
}
