@layer reset, base, buttons, icons, components, utilities, overrides;

@layer reset {
  html {
    /* color-scheme: light dark; */
    tab-size: 2;
    hanging-punctuation: first allow-end last;
  }

  body {
    margin: 0;
    padding: 0;

    @media (width < 500px) {}
  }

  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  h1,
  h2 {
    font-weight: 900;
    letter-spacing: -0.02rem;
  }

  h1,
  h2,
  h3 {
    line-height: 1.1;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6

  /* FUTURE :heading */
    {
    text-wrap: balance;
    margin-block-start: 0;
  }

  p,
  li,
  dd {
    text-wrap: pretty;
    max-inline-size: 88ch;
  }

  a {
    color: oklch(21.773% 0.12439 269.766);
    text-underline-offset: 2px;

    &:not(:is(:hover, :focus)) {
      text-decoration-color: color-mix(in srgb, currentColor, transparent 50%);
    }
  }

  sub,
  sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
  }

  sub {
    inset-block-end: -0.25em;
  }

  sup {
    inset-block-start: -0.5em;
  }

  ul,
  ol,
  dl {
    margin: 0;
    padding: 0;
    list-style-position: inside;

    ul,
    ol,
    dl {
      padding-inline-start: 2ch;
    }
  }

  img,
  video,
  iframe {
    display: block;
    max-inline-size: 100%;
    block-size: auto;
    border-style: none;
  }

  figure {
    inline-size: fit-content;
    margin-inline: auto;
  }

  figcaption {
    contain: inline-size;
    font-size: 90%;
  }

  input,
  select,
  textarea,
  button {
    font: inherit;
    /* FUTURE: appearance: base; */
  }

  label {
    display: block;
  }

  input:not( :where([type="submit"],
      [type="checkbox"],
      [type="radio"],
      [type="button"],
      [type="reset"])) {
    inline-size: 100%;
  }


  textarea {
    field-sizing: content;
    min-block-size: 5lh;
    inline-size: 100%;
    max-inline-size: 100%;
  }

  pre,
  code,
  kbd,
  samp {
    font-family: ui-monospace, SFMono-Regular, monospace;
  }

  pre {
    white-space: pre-wrap;
    background: CanvasText;
    color: Canvas;
    padding: 1.5rem;
  }

  svg {
    fill: currentColor;
  }

  [aria-disabled="true" i],
  [disabled] {
    cursor: not-allowed;
  }

  [disabled],
  label:has(input[disabled]) {
    opacity: 0.5;

    [disabled] {
      opacity: 1;
    }
  }

  hr {
    border-style: solid;
    border-width: 1px 0 0;
    color: inherit;
    height: 0;
    overflow: visible;
    margin-block: 2.5rem;
  }

  :target {
    scroll-margin: 3rlh;
  }

  table {
    caption-side: bottom;
    border-collapse: collapse;

    td {
      font-size: 90%;
    }

    td,
    th {
      word-break: normal;
      border: 1px solid gray;
      padding: 0.5rem;
    }
  }

  [role="region"][aria-labelledby][tabindex] {
    overflow: auto;
  }

  caption {
    font-size: 90%;
  }

  [hidden] {
    display: none !important;
  }

  .screenreader-only:not(:focus):not(:active) {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
  }

  :focus-visible {
    outline-offset: 2px;
  }

  @media (prefers-reduced-motion: no-preference) {
    @view-transition {
      navigation: auto;
    }

    html {
      interpolate-size: allow-keywords;

      &:focus-within {
        scroll-behavior: smooth;
      }
    }
  }
}
@layer base {

    :root {
        /* color-scheme: light dark; */
        /* --button-bg: #faa; */
        
        --button-bg: #f5f5f5;
        --button-fg: #111;
        --button-hv: #ccc;
        --button-bg-active: #fff;
        --menu-item-hv: #eee;
        --button-border: #ccc;
        --bg: #111;
        --fg: #eee;
    }

    /* @media (prefers-color-scheme: dark) {
        :root {
            --button-bg: #f5f5f5;
            --button-fg: #111;
            --bg: #111;
            --fg: #eee;
        }
    } */
div {  user-select: none; }
}
 @layer buttons {

   button {
     display: inline-flex;
     align-items: center;
     justify-content: center;

     padding: 0.3rem 0.5rem;

     background: var(--button-bg);
     color: var(--button-fg);

     border-radius: 3px;
     border: 1px solid #bdbdbd;

     font-size: 0.8rem;
     font-weight: 500;
     font-family: inherit;
     cursor: pointer;
     transition: background-color 0.25s;
     /* background-color: red !important; */
   }

   button:hover {
     background: var(--button-hv);
   }



   .fc-left-sidebar-button {
     flex-direction: column;
     padding: 1rem;
     font-size: 0.9em;
     border: none;
   }

   /* .fc-left-sidebar-button:hover {
     background: #cccccc;
   } */


   .control-button {}

   .button-block {
     width: 100%;
   }

   .control-button:hover {
     background: #bdbdbd;
   }



   /* .fc-sq-button {
     box-sizing: border-box;
     width: 1.7rem;
     height: 1.7rem;
     display: flex;
     justify-content: center;
     align-items: center;
     border-radius: 0.25rem;
     margin: 0 0.1rem;
     background-color: #f8f9fa;
     cursor: pointer;
     transition: background-color 0.38s;
     border: 1px solid #ccc;
   } */

   .fc-sq-button {
     /* алиас к иконке */
     display: inline-flex;
     align-items: center;
     justify-content: center;

     width: 28px;
     height: 28px;

     border-radius: 6px;
     background: transparent;
     border: 1px solid transparent;

     cursor: pointer;
   }

   .fc-sq-button:hover {
     /* background: #cccccc; */

     background: #eaeaea;
     border-color: #d0d0d0;
   }

   .fc-sq-button-sm {
     box-sizing: border-box;
     width: 1.5rem;
     height: 1.5rem;
     margin: 0 0.1rem;
     padding: 4px;
     border-radius: 0.25rem;
     background-color: #f8f9fa;
     cursor: pointer;
     transition: background-color 0.38s;
     border: 1px solid #ccc;
   }

   .fc-sq-button-sm:hover {
     background: #cccccc;
   }

   .button-l {
     width: 7rem;
   }

   .fc-small-button-with-icon {
     display: flex;
     margin: 0.1rem 0.1rem;
     align-items: center;
     border-radius: 2px;
     border: 1px solid #ccc;
     /* border: 1px solid red; */
     padding: 0.2rem 0.3rem;
     font-size: 0.7rem;
   }

   .fc-small-button-with-icon-no-hover {
     display: flex;
     margin: 0.1rem 0.1rem;
     align-items: center;
     border-radius: 2px;
     border: 1px solid #ccc;
     padding: 0.2rem 0.3rem;
     font-size: 0.7rem;
   }

   /* prevent sticking color on touch devices */
   .fc-small-button-with-icon-no-hover:hover {
     cursor: pointer;
   }

   .fc-small-button-with-icon:hover {
     cursor: pointer;
     background: #cccccc;
   }

   .button-with-icon {
     display: flex;
     margin: 0.1rem 0.1rem;
     align-items: center;
     border-radius: 2px;
     border: 1px solid #ccc;
     padding: 0.1rem 0.4rem;
     cursor: pointer;
   }

   .button-with-icon:hover {
     background: #cccccc;
   }

   .button-text {
     margin-left: 0.25rem;
     pointer-events: none;
   }

   .sub-button {
     margin-left: 0.3rem;
     padding: 0.2rem 0.5rem;
     border-radius: 3px;
     background: #cccccc;
   }

   .sub-button:hover {
     background: #cccccc;
   }
 }
@layer icons {
  .fc-icon {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 28px;
    height: 28px;

    background: transparent;
    border: 1px solid transparent;
    border-radius: 3px;

    cursor: pointer;
    user-select: none;
  }

  .fc-icon:hover {
    background: #eaeaea;
    border-color: #d0d0d0;
  }

  .fc-icon svg {
    width: 16px;
    height: 16px;
    fill: currentColor;

    pointer-events: none;
    /* ← КЛЮЧЕВО */
  }

  /* sizes */
  .fc-icon--sm {
    width: 24px;
    height: 24px;
  }

  .fc-icon--md {
    width: 28px;
    height: 28px;
  }

  .fc-icon--lg {
    width: 32px;
    height: 32px;
  }


  /* for button icons  */
  .fc-btn-icon {
    display: inline-flex;
    margin-right: 4px;
    /* было 6px, уменьшили */
    line-height: 0;
    /* помогает с вертикальным выравниванием */
  }

  .fc-btn-icon--sm {
    width: 16px;
    height: 16px;
  }


  .fc-btn {
    height: 28px;
    /* как у fc-icon--md */
    padding: 0 6px;
    /* горизонтальные отступы */
    display: inline-flex;
    align-items: center;
  }


  .is-danger {
    color: red;
  }

  .is-warning {
    color: orange;
  }

}
@layer components {

  #fitcropedit {
    font-family: Arial, sans-serif;
    background-color: #f9f9f9;
    position: relative;
    display: flex;
    flex-direction: column;
    margin-left: auto;
    margin-right: auto;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;
    overflow: hidden;
    margin-top: 2px;
  }

  #fc-wraper {
    display: flex;
    flex: 1;
    flex-shrink: 0;
    /* + */
    min-height: 0;
    /* ❗ критично для scroll */
  }

  
  /* textarea */
.fc-text-input-area {
    position: fixed; /* Лучше fixed, чтобы она не уезжала при скролле страницы */
    top: 0;
    left: 0;
    width: 1px;       /* Минимальный размер, чтобы iOS считал объект видимым */
    height: 1px;
    opacity: 0;       /* Невидима глазу */
    pointer-events: none; /* Клики проходят сквозь неё */
    z-index: -1;      /* Под канвасом, но в потоке */
    
    /* Остальное как у тебя */
    overflow: hidden;
    resize: none;
    border: none;
    outline: none;
    font-size: 16px; /* ВАЖНО: чтобы iOS не зумил страницу при фокусе */
}


  /* .fc-text-input-area {
    position: absolute;
    opacity: 0.01;
    
    pointer-events: auto;
    
   z-index: 9999;
    
    height: 1px;
    width: 1px;
    left: -100px;
    top: 0;
    overflow: hidden;
    resize: none;
    border: none;
    outline: none;
  } */

  /* Поднимем выше, чтобы браузер считал её важной 
  /* .fc-text-input-area {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  z-index: 1000;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: 0;
  border: none;
  outline: none;
  overflow: hidden;
  background: transparent;
  caret-color: transparent;
} */
  /* Скрываем каретку самой textarea */

  @media (max-width: 768px) {
    #fc-wraper {
      flex-direction: column;
      /* new */
      height: 100%;
    }
  }

  .fc-active {
    background: #7fdbff !important;
  }

  .history-list {
    background-color: #fafafa;
    border: 1px solid #eee;
    box-shadow: 0px 2px 2px #dddddd;
    padding: 1rem;
  }

  /* ----------Icons---------- */

  .fc-custom-icon {
    width: 1.1rem;
    height: 1.1rem;
    pointer-events: none;
  }

  .fc-small-custom-icon {
    width: 0.8rem;
    height: 0.8rem;
    pointer-events: none;
  }



  /* ----------Rounded box---------- */

  .fc-rounded-box {
    border-radius: 0.15rem;
    border: 1px solid #ccc;
    padding: 0.2rem 0.2rem;
    color: #616161;
    min-width: 2.5rem;
    text-align: center;
  }

  .left-rounded-input {
    display: block;
    width: 2.5rem;
    border-top-left-radius: 0.25rem;
    border-bottom-left-radius: 0.25rem;
    border: 1px solid #ccc;
    padding: 0.45em 0.6em 0.35em;
    color: #616161;
    text-align: center;
  }

  .fc-rounded-input-type-2 {
    display: block;
    width: 2.5rem;
    border-radius: 0.25rem;
    border-bottom-left-radius: 0.25rem;
    border: 1px solid #ccc;
    padding: 0.3rem 0.6rem 0.35rem;
    color: #616161;
    text-align: center;
  }

  .right-rounded-postfix {
    margin-left: 0.1rem;
    width: 1.8rem;
    border-top-right-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem;
    background-color: #f5f5f5;
    color: #616161;
    border: 1px solid #ccc;
    text-align: center;
    padding-top: 2px;

  }

  .rounded-input {
    width: 1.7rem;
    border-radius: 0.25rem;
    border: 1px solid #ccc;
    padding: 0.15em 0.6em;
    color: #616161;
  }

  .fc-rounded-sub-input {
    width: 3rem;
    border-radius: 0.25rem;
    border: 1px solid #ccc;
    padding: 0.15em 0.3em;
    color: #616161;
  }
}
@layer utilities {


  /* ----------Flex---------- */

  .fc-flex {
    display: flex;
  }

  .fc-flex-column {
    flex-direction: column;
  }

  .fc-align-center {
    align-items: center;
  }

  .fc-space-between {
    justify-content: space-between;
  }


  /* -----------usage ?-------- */
  /* Wheat: #F5DEB3 (245, 222, 179)
Vegas Gold: #C4B454 (196, 180, 84)
Golden Dream: #EA EF2C (234, 239, 44)
Canary: #FFFF9F (255, 255, 159)
Cream: #FFFFCC (255, 255, 204) */

  .fc-warning {
    background-color: #FFFF9F;

  }

  /* ----------Spacing---------- */

  .fc-p-0 {
    padding: 0;
  }

  .fc-p-1 {
    padding: 0.5rem;
  }

  .fc-p-2 {
    padding: 1.0rem;
  }

  .fc-p-3 {
    padding: 1.5rem;
  }

  .fc-m-0 {
    margin: 0;
  }

  .fc-m-1 {
    margin: 0.5rem;
  }

  .fc-mx-auto {
    margin-left: auto;
    margin-right: auto;
  }

  .fc-mx-1 {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
  }

  .fc-mx-2 {
    margin-left: 1rem;
    margin-right: 1rem;
  }

  .fc-mx-3 {
    margin-left: 1.5rem;
    margin-right: 1.5rem;
  }

  .fc-my-1 {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
  }

  .fc-my-2 {
    margin-top: 1.0rem;
    margin-bottom: 1.0rem;
  }

  .fc-my-3 {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .fc-my-4 {
    margin-top: 2.0rem;
    margin-bottom: 2.0rem;
  }

  .fc-mt-0 {
    margin-top: 0;
  }

  .fc-mt-1 {
    margin-top: 0.5rem;
  }

  .fc-mt-2 {
    margin-top: 1rem;
  }

  .fc-mt-3 {
    margin-top: 1.5rem;
  }

  .fc-mb-1 {
    margin-bottom: 0.5rem;
  }

  .fc-mb-2 {
    margin-bottom: 1rem;
  }

  .fc-mb-3 {
    margin-bottom: 1.5rem;
  }

  .fc-mb-4 {
    margin-bottom: 2rem;
  }

  .fc-ms-05 {
    margin-left: 0.25rem !important;
  }

  .fc-ms-1 {
    margin-left: 0.5rem !important;
  }

  .fc-ms-2 {
    margin-left: 1rem !important;
  }

  .fc-ms-3 {
    margin-left: 1.5rem !important;
  }

  /* .ms-4 {
  margin-left: 2rem;
}

.ms-5 {
  margin-left: 2.5rem;
} */

  .fc-me-05 {
    margin-right: 0.25rem !important;
  }

  .fc-me-1 {
    margin-right: 0.5rem !important;
  }

  .fc-mp-0 {
    margin: 0;
    padding: 0;
  }

  /* ----------Text---------- */

  .fc-text-gray {
    color: gray;
  }

  .fc-text-center {
    text-align: center;
  }

  .fc-text-decoration-none {
    text-decoration: none;
  }

  .fc-text-sm {
    font-size: 0.6rem;
  }

 
  /* ---------- ---------- */
  .fc-delimeter {
    margin: 0.3rem 0 0.5rem;
    height: 1px;
    background: #eee;
  }

  /* ----------Avoid clicks---------- */
  .fc-avoid-clicks {
    pointer-events: none;
    user-select: none; 
   
  }
   .fc-no-user-select {
    user-select: none; 
  }
 
  .fc-hidden {
    display: none !important;
  }

  .fc-disabled {
    color: gray;
    pointer-events: none;
    cursor: default;
    opacity: 1
  }

  .fc-bold {
    font-weight: bold;
  }

  .fc-relative {
    position: relative;
  }
}
@layer components {

  #fc-appbar {
    position: relative;
    display: flex;
    align-items: center;
    box-shadow: 0px 2px 2px #ddd;
    background: #f5f5f5;
    height: 30px;
    gap: 0.5rem;
  }

  #fc-appbar> :last-child {
    margin-left: auto;
  }

  .fc-appbar-logo {
    font-size: 0.8rem;
    margin-left: 0.8rem;
    margin-right: 1.3rem;
    font-weight: 600;
    color: gray;
  }

  .fc-appbar-menu-item {
    user-select: none;
    position: relative;
  }

  .fc-button-no-border {
    border: none;
  }

  .fc-appbar-menu-tittle .fc-icon::before {
    content: "▼";
    /* display: inline-block;
  transition: transform 0.2s ease; */
  }

  .fc-appbar-menu-tittle .fc-icon.fc-open::before {
    content: "▲";
    /* transform: rotate(180deg); */
  }

  .fc-appbar-dropdown.fc-open {
    display: block;

  }

  .fc-appbar-dropdown {
    min-width: 100px;
    background-color: white;
    position: absolute;
    top: 100%;
    left: 0;
    /* border: 1px solid #eee; */
    box-shadow: 0px 2px 2px #ddd;
    padding: 1rem;
    z-index: 2000;
    display: none;
  }

  .fc-appbar-dropdown-item {
    user-select: none;
    padding: 0.2rem 0.2rem;
    cursor: pointer;
    font-size: 0.8rem;
  }

  .fc-appbar-dropdown-item:hover {
    background: var(--button-hv);
  }

  /* submrnu */

  .fc-has-submenu {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .fc-submenu {
    position: absolute;
    top: 0;
    left: 100%;
    display: none;
    min-width: 180px;
    z-index: 1000;
  }

  .fc-has-submenu:hover>.fc-submenu {
    display: block;
  }

  .fc-submenu-arrow {
    font-size: 10px;
    opacity: 0.6;
  }

  /* dividers */

  .fc-menu-spacer {
    height: 8px;
  }

  .fc-menu-separator {
    display: block;
    height: 1px;
    margin: 6px 0;

    background: #eee !important
  }

  /* for modile */
  @media (max-width: 768px) {
  .fc-submenu {
    left: auto;
    right: 100%;
  }
}
 
}
@layer components {

  #fc-topbar {
    margin-bottom: 0.3rem;
  }

  .fc-topbar-container {
    margin-bottom: 0.3rem;
    background: #f5f5f5;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding-left: 0.7rem;
    padding-right: 0.1rem;
    padding-top: 0.2rem;
    padding-bottom: 0.3rem;
    font-size: 0.8rem;
    gap: 0rem 0.05rem;
  }

   .fc-topbar-box {
    background: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.1rem 0.3rem
  } 

  #fc-topbar-zoom {
    width: 3rem;
  }

  @media (max-width: 768px) {
    .fc-topbar-container {
      gap: 0.3rem 0.5rem;
      justify-content: center
    }
  }

}
@layer components {
  .fc-progressbar {
    height: 5px;
    width: 0%;
    /* width: 100%; */
    background: #2196f3;
  }
}
@layer components {

  .fc-left-sidebar {
    width: 34px;
    background: #f5f5f5;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4px 0;
    border-right: 1px solid #ddd;
  }


  .fc-tool {
    position: relative;
    width: 30px;
    height: 30px;
    /* margin: 2px 0; */
    /* border-radius: 6px; */
    display: grid;
    place-items: center;
    cursor: pointer;
  }

  .fc-tool:hover {
    background: var(--button-hv);
  }

  .fc-tool-icon {
    font-size: 18px;
  }

  /* corner */
  .fc-tool-corner {
    position: absolute;
    right: 2px;
    bottom: 2px;
    font-size: 10px;
    opacity: 0.6;
  }

  /* submenu */
  .fc-tool-submenu {
    position: absolute;
    left: 40px;
    top: 0;
    display: none;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
  }

  .fc-tool.submenu-open .fc-tool-submenu {
    display: flex;
    flex-direction: column;
  }

  .fc-tool-subitem {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 4px;
  }

  .fc-tool-subitem:hover {
    background: #e6f3ff;
  }

  /* active */
  .fc-tool.fc-leftsidebar-active {
    /* background: #e6f3ff; */
    /* background: #4da3ff; */
    background: var(--button-bg-active);
    /* border: 1px solid var(--button-border); */
    box-shadow: inset 0 0 0 1px var(--button-border);
  }


  /* media */

  @media (max-width: 768px) {
    .fc-left-sidebar {
      width: 100%;
      height: 40px;
      flex-direction: row;
      justify-content: center;
      padding: 0 4px;
      border-right: none;
      border-bottom: 1px solid #ddd;
    }

    .fc-tool {
      margin: 2px 0px;
    }
  }

  @media (max-width: 768px) {
    .fc-tool-submenu {
      left: 0;
      top: 40px;
      flex-direction: row;
      z-index: 100;
    }

    .fc-tool.submenu-open .fc-tool-submenu {
      display: flex;
    }
  }

  @media (max-width: 768px) {
    .fc-tool-corner {
      right: 1px;
      top: 1px;
      bottom: auto;
      font-size: 9px;
    }
  }

  /* (опционально) Увеличим touch-area */
  @media (max-width: 768px) {

    .fc-tool,
    .fc-tool-subitem {
      width: 38px;
      height: 38px;
    }
  }



  /* component <- */
}
@layer components {

  /* =========================
     RIGHT SIDEBAR CONTAINER
     ========================= */

  .fc-right-sidebar {
    width: 250px;
    min-width: 250px;
    max-width: 250px;
    height: 100%;
    background: #ffffff;
    border-left: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    overflow: hidden;
    padding: 1rem;
  }

  /* =========================
     HEADER
     ========================= */

  .fc-right-sidebar-header {
    padding: 14px 16px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
  }

  .fc-right-sidebar-title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    line-height: 1.25;
  }

  .fc-right-sidebar-subtitle {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
  }

  /* =========================
     CONTENT
     ========================= */

  .fc-right-sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px 20px;
  }

  /* =========================
     PANEL GROUP
     ========================= */

  .fc-panel-group {
    margin-bottom: 22px;
  }

  .fc-panel-header {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7280;
    margin-bottom: 10px;
    font-weight: 600;
  }

  /* =========================
     PROPERTY ROW
     ========================= */

  .fc-property-row {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
  }

  .fc-property-label {
    font-size: 16px;
    color: #374151;
    user-select: none;
  }

  .fc-property-control {
    width: 100%;
  }

  .fc-panel-tool-title {
    /* padding: 12px 14px 10px; */
    font-size: 14px;
    /* font-weight: 600;
  color: #222; */
    border-bottom: 1px solid #eee;
    margin-bottom: 0.5rem;
  }

  .fc-panel-tool-name {
    text-transform: capitalize;
    font-weight: 600;
  }

  /* =========================
     INPUTS
     ========================= */

  .fc-input-text,
  .fc-input-number,
  .fc-input-select {
    width: 100%;
    padding: 6px 8px;
    font-size: 14px;
    line-height: 1.4;
    color: #111827;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
  }

  .fc-input-text::placeholder {
    color: #9ca3af;
  }

  .fc-input-text:focus,
  .fc-input-number:focus,
  .fc-input-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
  }

  /* =========================
     CHECKBOX
     ========================= */

  .fc-input-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
  }

  /* =========================
     COLOR PICKER
     ========================= */

  .fc-input-color {
    -webkit-appearance: none;
    appearance: none;
    width: 48px;
    height: 28px;
    padding: 2px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
  }

  .fc-input-color::-webkit-color-swatch-wrapper {
    padding: 0;
  }

  .fc-input-color::-webkit-color-swatch {
    border: none;
    border-radius: 2px;
  }

  /* =========================
     TEXTAREA (Text Tool)
     ========================= */

  .fc-input-textarea {
    width: 100%;
    min-height: 80px;
    resize: vertical;
    padding: 6px 8px;
    font-size: 13px;
    line-height: 1.4;
    border: 1px solid #d1d5db;
    border-radius: 4px;
  }

  .fc-input-textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
  }


  /* =========================
     ACTIONS
     ========================= */
  .fc-panel-actions {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
  }

  /* +++ */


  .fc-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
  }


  .fc-inline {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: nowrap;
  }

/* akkordeon */

.fc-group-title {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: space-between; /* стрелка справа */
}

/* Закрашенный равносторонний треугольник */
.fc-group-arrow {
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid #666; /* цвет стрелки */
    transition: transform 0.2s ease;
}

/* Когда раскрыта */
.fc-group.is-open > .fc-group-title > .fc-group-arrow {
    transform: rotate(180deg); /* перевернули треугольник вниз */
}

.fc-group-body {
  overflow: hidden;
  max-height: 9999px; /* пока открыто */
  /* transition: max-height 0.25s ease, padding 0.25s ease; */
}

.fc-group.is-accordion .fc-group-body {
  max-height: 0;
  padding: 0;
}




.fc-group.is-accordion.is-open .fc-group-body {
  max-height: 9999px;
  padding: 6px 0;
  /* padding можно адаптировать по дизайну */
  /* transition: max-height 0.25s ease, padding 0.25s ease; */
}

.fc-group-title {
  cursor: pointer;
  user-select: none;
}


 

}
@layer components {
  #fc-main-canvas-wraper {
    flex: 1 1 auto;
    position: relative;
    /* flex-grow: 1; */
    border: none;
    /* + */
    min-width: 0;
  }


  .fc-layer-canvas {
    position: absolute;
    left: 0;
    top: 0;
    overflow: hidden;
    /* запретить жесты/скролл на тачах */
    touch-action: none;
  }

  #fc-gorizon-ruler {
    position: absolute;
  }

  #fc-vertical-ruler {
    position: absolute;
  }

  @media (max-width: 768px) {
    #fc-main-canvas-wraper {

      /* flex-grow: 0;
       height: 65vh !important;
       border: 2px solid blue; */

      /* new */
      flex: 1 1 auto;
      /* ← ВАЖНО */
      min-height: 0;
      /* ← КРИТИЧЕСКИ ВАЖНО */


    }
  }
}
/* backdrop и выравнивание */
#fc-service-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    /* поверх всего редактора */
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.fc-modal-backdrop {
    /* position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  pointer-events: auto; */

    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, 0.5);
    animation: fade-in .18s ease-out forwards;
}

.fc-modal-content {
    position: relative;
    z-index: 1010;
    pointer-events: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

/* сама панель */
.fc-modal-panel {
    /* 2 times fot up  */
    transform: translateY(-3%);
    background: #fff;
    border-radius: 0.65rem;
    padding: 1rem 2rem 2rem;
    min-width: 30%;
    max-width: 90%;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25);
    animation: fc-modal-fade-in 0.2s ease;
}

.fc-modal-overflow-y {
    overflow-y: auto;
    max-height: 75vh;
    /* padding: 0 1rem 1rem; */
    padding: 0;
}


.fc-form-group {
    display: flex;
    margin-bottom: 1rem;
    gap: 12px;
}

.fc-form-group-label {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    /* border: 1px solid red !important; */
}

.fc-form-group-input {
    flex: 2;
    display: flex;
    align-items: center;
    justify-content: start;
}

.fc-width-85 {
    width: 85px !important;

}



.fc-modal-input {
    /* width: min-content; */
    /* max-width: 50px; */
    padding: 0.4rem;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.fc-modal-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}

.fc-modal-input::placeholder {
    color: #aaa;
    font-style: italic;
}

input[type="checkbox"].fc-modal-input {
    width: 16px;
    height: 16px;
}



.fc-color-picker {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;

    width: 60px;
    height: 34px;
    /* примерно как обычный input */
    padding: 4px;
    border: 1px solid #ccc;
    border-radius: 4px;

    background-color: #fff;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Ховер и фокус */
.fc-color-picker:hover {
    border-color: #999;
}

.fc-color-picker:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}

/* Сам квадрат цвета внутри */
.fc-color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
}

.fc-color-picker::-webkit-color-swatch {
    border: none;
    border-radius: 2px;
}

.fc-color-picker::-moz-color-swatch {
    border: none;
    border-radius: 2px;
}

.fc-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

@keyframes fc-modal-fade-in {
    from {
        opacity: 0;
        transform: translateY(-3%) scale(0.93);
    }

    to {
        opacity: 1;
        transform: translateY(-3%) scale(1);
    }
}
@layer utilites {

  .brd {
    border: 1px solid yellowgreen !important;
  }

  .brd-1 {
    border: 1px solid gold !important;
  }

  .brd-2 {
    border: 1px solid blue !important;
  }

}
@layer components {
  .fc-notification {
    position: fixed;
    top: 40%;
    left: 50%;
    transform: translateX(-50%);

    display: flex;
    align-items: flex-start;
    /* gap: 10px; */

    width: clamp(280px, 80vw, 560px);
    padding: 12px 16px;

    border-radius: 6px;
    background: #eef4ff;
    /* info */

    color: #1f3a5f;
    text-align: center;
    font-size: 14px;
    line-height: 1.4;

    box-shadow:
      0 4px 12px rgba(0, 0, 0, 0.08),
      0 1px 3px rgba(0, 0, 0, 0.06);

    z-index: 1000;

    animation: fc-toast-in 160ms ease-out;
  }

  .fc-notification__icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
    opacity: 0.85;
  }

  .fc-notification__icon svg {
    width: 100%;
    height: 100%;
    display: block;
  }

  .fc-notification__text {
    flex: 1;
  }
}
@layer components {

    .fc-palette-sidebar {
        display: flex;

        flex-direction: row;
        background: #f5f5f5;
        border-right: 1px solid #ddd;
        min-width: 0;
        min-height: 0;
    }

    .fc-palette-viewport {
        height: 100%;
        overflow: hidden;
    }



    .fc-palette-group {
        display: flex;
        flex-direction: column;
        align-items: center;

    }

    .fc-palette-chevron {
        height: 16px;
        font-size: 10px;
        cursor: pointer;
        border: none;
        background: transparent;
    }

    .fc-palette-chevron:hover {
        background: var(--button-hv);

    }

    /* Состояние когда панель развернута */
    #fc-color-palettes.is-expanded {
        /* Запрещаем элементу растягиваться (grow = 0) */
        flex: 0 0 auto !important;
        /* Ширина будет подстраиваться под содержимое */
        width: fit-content !important;
        /* Для старых браузеров и Firefox */
        width: -moz-fit-content !important;
    }



    .fc-fix-height-viewport {
        /* В Firefox height: 100% работает только если у родителя есть высота */
        height: 100% !important;
        max-width: 100%;
        width: fit-content;
        overflow: visible !important;

    }

    .fc-palette-grid {
        will-change: transform;
        display: flex;
        flex-direction: column;
        flex-wrap: wrap;

    }

    .fc-fix-height {
        /* 1. Вместо Flex используем Grid */
        display: grid !important;

        /* 2. Аналог flex-direction: column — заставляем элементы идти сверху вниз */
        grid-auto-flow: column !important;

        /* 3. Указываем высоту рядов (высота одного цвета 24px) */
        /* auto-fill заполнит колонку до тех пор, пока хватает высоты (600px) */
        grid-template-rows: repeat(auto-fill, 24px) !important;

        /* 4. Высота, при достижении которой начнется новая колонка справа */
        /* height: 600px !important;  */

        /* 5. Заставляем контейнер расширяться ВШИРЬ под все созданные колонки */
        width: max-content !important;

        /* Сброс лишнего */
        transform: none !important;
        overflow: visible !important;

        box-sizing: border-box !important;

    }



    .fc-fix-vieport-height-mobile {
        height: auto !important;
    }

    .fc-fix-grid-height-mobile {
        flex-wrap: wrap !important;
        transform: none !important;
    }


    .fc-palette-color {
        width: 24px;
        height: 24px;
        cursor: pointer;

        border-left: 1px solid #383838;
        border-right: 1px solid #383838;
        border-bottom: 1px solid #383838;
    }

    .fc-palette-color:first-child {
        border-top: 1px solid #383838;
    }

    .fc-palette-color.is-fill {
        outline: 2px solid #3b82f6;
        outline-offset: -2px;
    }

    .fc-palette-color.is-stroke {
        outline: 2px dashed #ef4444;
        outline-offset: -2px;
    }

    /* 📱 MOBILE */
    @media (max-width: 768px) {


        #fc-color-palettes.is-expanded {
            /* На мобилке расширяем высоту, а не ширину */
            width: 100% !important;
            height: auto !important;
            flex: 0 0 auto !important;
        }

        .fc-palette-sidebar {
            flex-direction: column;
            flex: 0 0 30px;
            min-height: 30px;
            /* Задаем базу */
        }


        .fc-palette-group {
            flex-direction: row;
            /* flex-wrap: wrap !important; */
            /* width: auto; */
        }

        .fc-palette-viewport {
            height: 30px;
            /* overflow: hidden; */
        }

        .fc-palette-grid {
            flex-direction: row;
            /* transform: none !important; */
            flex-wrap: nowrap;
        }

        .fc-palette-color {
            flex-shrink: 0;
        }

        .fc-fix-vieport-height-mobile {
            height: auto !important;
            max-height: 300px;
            /* Ограничитель, чтобы не перекрыло весь экран, если цветов ОЧЕНЬ много */
            overflow-y: auto !important;
        }

        .fc-fix-grid-height-mobile {
            display: flex !important;
            flex-wrap: wrap !important;
            flex-direction: row !important;
            width: 100% !important;
            transform: none !important;
        }

    }

}
