/* Nader Studio Pro skin — Photoshop-inspired UI layer.
   Keeps miniPaint's existing editor logic and controls intact. */
:root {
  --background: #17191d;
  --text-color: #e8eaf0;
  --text-color-muted: #a0a6b2;
  --section-background-color: #202329;
  --area-background-color: #292e36;
  --block-background-color: #252a32;
  --header-background-color: #2b3039;
  --button-background-color: #303641;
  --button-background-color-hover: #3d4654;
  --button-background-color-active: #3b526f;
  --button-text-color-active: #dceaff;
  --button-toggle-background-color: #353d49;
  --button-toggle-background-color-hover: #424c5b;
  --input-background-color: #171b21;
  --input-background-color-hover: #252c36;
  --input-text-color: #f1f4f8;
  --input-border-color: #414957;
  --input-border-color-active: #6aa8f5;
  --input-group-border-color: #343b46;
  --menu-background-color: #202329;
  --menu-text-color: #e0e4eb;
  --menu-dropdown-background-color: #272d36;
  --menu-dropdown-border-color: #485364;
  --menu-dropdown-text-color: #e7eaf0;
  --menu-dropdown-text-muted-color: #9ca6b5;
  --menu-dropdown-hover-background-color: #3a4e68;
  --menu-dropdown-hover-text-color: #ffffff;
  --menu-dropdown-divider-color: #3d4551;
  --background-color-active: #3d5b7f;
  --background-color-hover: #38414e;
  --text-color-active: #ffffff;
  --border-color: #3b424d;
  --scrollbar-track-color: #20242b;
  --scrollbar-thumb-color: #48515e;
  --mobile-menu-toggle-filter: invert(1);
}
body {
  background: #17191d;
  color: #e8eaf0;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 13px;
  letter-spacing: .01em;
}
.wrapper {
  top: 32px;
  bottom: 0;
  grid-template-columns: 48px minmax(0, 1fr) 278px;
  grid-template-rows: 48px minmax(0, 1fr);
  gap: 0;
}
.main_menu { z-index: 120; }
.main_menu > ul.menu_bar {
  height: 32px;
  padding-left: 10px;
  background: #202329;
  border-bottom: 1px solid #343a44;
}
.main_menu > ul.menu_bar > li > a {
  font-size: 12px;
  padding: 0 12px;
  color: #d9dee7;
}
.main_menu > ul.menu_bar > li > a:hover,
.main_menu > ul.menu_bar > li > a[aria-expanded="true"] {
  background: #343c48;
  color: #fff;
}
.submenu {
  min-width: 0;
  margin: 0;
  padding: 0 10px;
  background: #242830;
  border-bottom: 1px solid #3a414c;
}
.logo {
  width: 132px;
  min-width: 132px;
  height: 38px;
  margin: 0 8px 0 0;
  padding: 9px 4px 8px 37px;
  font-size: 14px;
  letter-spacing: .02em;
}
.attributes {
  width: auto;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 34px;
  padding: 4px 8px;
  margin: 0 !important;
  background: transparent;
  border-left: 1px solid #3a414c;
}
.attributes .item { margin-right: 14px; }
.attributes .item > label { color: #bac2ce; }
.attributes input[type="number"],
.attributes input[type="text"],
.attributes select { min-height: 26px; }
.undo_button { width: 38px; height: 38px; }
.sidebar_left {
  width: 48px;
  max-height: 100%;
  padding: 7px 5px 10px;
  margin: 0;
  align-content: flex-start;
  justify-content: center;
  background: #22262d;
  border-right: 1px solid #3a414c;
  gap: 4px;
}
.sidebar_left .item {
  width: 36px;
  height: 36px;
  margin: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background-color: transparent;
  transition: background-color .12s ease, border-color .12s ease;
}
.sidebar_left .item:after { background-size: 21px 21px; }
.sidebar_left .item:hover {
  background: #343c48;
  border-color: #465160;
}
.sidebar_left .item.active {
  background: #344b68;
  border-color: #668bb9;
  box-shadow: inset 3px 0 #8bbcff;
}
.middle_area {
  min-width: 0;
  min-height: 0;
  margin: 0;
  background-color: #17191d;
  background-image: radial-gradient(#292e36 1px, transparent 1px);
  background-size: 18px 18px;
}
.main_wrapper { background: transparent; }
.canvas_wrapper { box-shadow: 0 12px 40px rgba(0,0,0,.35); }
.sidebar_right {
  width: 278px;
  min-width: 0;
  margin: 0;
  padding: 8px;
  gap: 8px;
  background: #22262d;
  border-left: 1px solid #3a414c;
}
.sidebar_right .block {
  margin: 0;
  overflow: hidden;
  border: 1px solid #3a424e;
  border-radius: 7px;
  background: #272c34;
  box-shadow: none;
}
.sidebar_right .block h2 {
  min-height: 34px;
  padding: 8px 11px;
  background: #2d333d;
  border-bottom: 1px solid #3a424e;
  border-radius: 0;
  color: #e8ebf1;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .025em;
}
.sidebar_right .block .content { padding: 9px; }
.sidebar_right .block.layers { flex: 1 1 260px; min-height: 180px; }
.sidebar_right .block.layers .content { padding: 9px; }
.layers_list { margin-top: 6px; }
.layers_list .item { margin-bottom: 4px; }
.layers_list .layer_name {
  height: 28px;
  padding: 5px 8px;
  border-radius: 5px;
  border-color: #414a58;
  background: #303742;
  font-size: 12px;
}
.layers_list .item.active .layer_name {
  background: #354d6a;
  border-color: #6d91bc;
  color: #fff;
}
.layers_list .visibility { height: 28px; }
.layers_list .delete { height: 28px; }
button, input[type="button"] {
  min-height: 25px;
  border-color: #48515e;
  border-radius: 5px;
  background-image: none;
  box-shadow: none;
  transition: background-color .12s ease, border-color .12s ease;
}
button:hover, input[type="button"]:hover {
  background-color: #3b4655;
  border-color: #64758b;
}
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
  outline: 2px solid #79b5ff;
  outline-offset: 2px;
}
input[type="text"], select, input[type="number"], textarea {
  border-radius: 5px;
  border-color: #414a58;
  min-height: 26px;
}
.main_menu > ul.menu_dropdown {
  border-radius: 6px;
  overflow: auto;
  box-shadow: 0 12px 28px rgba(0,0,0,.45), 0 0 0 1px #485364;
}
.main_menu > ul.menu_dropdown > li > a { height: 32px; }
.block, .item, button, input, select { -webkit-tap-highlight-color: transparent; }
@media (max-width: 900px) {
  .wrapper { grid-template-columns: 44px minmax(0,1fr) 230px; }
  .sidebar_right { width: 230px; padding: 6px; }
  .logo { width: 112px; min-width: 112px; }
}
@media (max-width: 700px) {
  body { padding-top: 50px; }
  .wrapper {
    top: 50px;
    bottom: 0;
    grid-template-columns: 1fr;
    grid-template-rows: 44px minmax(0,1fr);
    grid-template-areas: "submenu" "main";
  }
  .submenu { padding: 0 48px; }
  .logo { display: none; }
  .attributes { border: 0; }
  .sidebar_left {
    position: fixed;
    z-index: 80;
    top: 94px;
    bottom: 0;
    left: 0;
    width: 48px;
    max-height: none;
    box-shadow: 8px 0 24px rgba(0,0,0,.3);
  }
  .sidebar_right {
    position: fixed;
    z-index: 80;
    top: 94px;
    right: -250px;
    bottom: 0;
    width: 250px;
    max-height: none;
    box-shadow: -8px 0 24px rgba(0,0,0,.3);
  }
  .sidebar_right.active { right: 0 !important; }
  .middle_area { grid-area: main; min-height: 0; }
  .mobile_menu { z-index: 200; }
}
@media (max-width: 420px) {
  .main_menu > ul.menu_bar { padding-left: 48px; padding-right: 48px; }
  .main_menu > ul.menu_bar > li > a { padding: 0 7px; font-size: 11px; }
  .attributes .item { margin-right: 8px; }
}
@media (max-width: 700px) {
  .sidebar_left { left: -56px; transition: left .2s ease; }
  .sidebar_left.active { left: 0; }
}
/* Brand and accessibility refinements */
.logo { color: #f2f5fa; font-weight: 700; }
.noscript-notice { position: relative; z-index: 300; margin: 0; padding: 12px 16px; color: #fff; background: #8b3c32; text-align: center; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Native layer blend-mode control added in Studio Upgrade 03. */
.studio-blend-control {
  display: grid;
  grid-template-columns: minmax(82px, 1fr) minmax(120px, 1.35fr);
  align-items: center;
  gap: 8px;
  margin: 10px 0;
  padding: 9px 10px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 7px;
  background: rgba(255,255,255,.035);
  color: #cbd2dc;
  font-size: 12px;
}
.studio-blend-control label { font-weight: 600; }
.studio-blend-control select {
  width: 100%;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid #46505e;
  border-radius: 5px;
  background: #242b35;
  color: #f3f5f8;
  font: inherit;
}
.studio-blend-control select:focus-visible {
  outline: 2px solid #68a7ff;
  outline-offset: 2px;
}
