@layer reset, base, buttons, 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: #bdbdbd;
        --menu-item-hv: #eee;
        --bg: #111;
        --fg: #eee;
    }

    /* @media (prefers-color-scheme: dark) {
        :root {
            --button-bg: #f5f5f5;
            --button-fg: #111;
            --bg: #111;
            --fg: #eee;
        }
    } */

}
 @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;
   }

   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:hover {
     background: #cccccc;
   }


   .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 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;
  }

  #fc-wraper {
    display: flex;
    flex: 1;
    flex-shrink: 0;
  }


  .fc-layer-canvas {
    position: absolute;
    left: 0;
    top: 0;
    overflow: hidden;
    /* border: 3px solid greenyellow; */

    touch-action: none;
    /* запретить жесты/скролл на тачах */
  }

  @media (max-width: 768px) {
    #fc-wraper {
      flex-direction: column;
    }
  }

  .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: 2rem;
    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 utilites {

  .brd {
    border: 1px yellowgreen;
  }

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

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

}
@layer utilities {


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

  .fc-flex {
    display: flex;
  }

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

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

  .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-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; 
    /* border: 1px solid greenyellow; */
  }

  .hidden {
    display: none !important;
  }

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

  .bold {
    font-weight: bold;
  }

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

	.standalone-custom-icon {
		width: 1rem;
		height: 1rem;
	}

	.fc-position-top-right {
		position: absolute;
		top: 0;
		right: 1rem;
	}

	.cursor-pointer {
		cursor: pointer
	}

	/* ----------colors---------- */

	.color-gray {
		color: #939393
	}

}
@layer components {

  #fc-appbar {
    position: relative;
    display: flex;
    align-items: center;
    box-shadow: 0px 2px 2px #ddd;
    background: #f5f5f5;
    height: 30px;
    /* border: 1px solid greenyellow; */
    /* display: none; */
  }

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

  }

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

  .fc-appbar-item {
    position: relative;
    display: flex;
    align-items: center;

    font-size: 0.8rem;
    font-weight: 500;

    margin-top: 0.4rem;
    margin-bottom: 0.4rem;
    margin-right: 1rem;

    padding-left: 0.5rem;
    padding-right: 0.5rem;

    cursor: pointer;
  }

  .fc-appbar-item:hover {
    background: #eee;
  }

  .fc-appbar-ul {
    font-size: 0.9rem;
    margin: 0;
    padding: 0;
    list-style-type: none;
  }

  .inner-dropdown-master {
    font-size: 0.9rem;
    white-space: nowrap;
  }

  .appbar-dropdown-box {
    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;
  }

  .fc-appbar-items-link {
    margin: 0.05rem;
  }


  .fc-appbar-item-link-text {
    padding: 0.3rem 0.3rem;
    min-width: 70px;
    cursor: pointer;
    /* border: 1px solid greenyellow; */
  }

  .fc-appbar-item-link-text:hover {
    background: var(--menu-item-hv);
  }
}
@layer components {

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

  .fc-topbar-container {
    background: #f5f5f5;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding-left: 0.1rem;
    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-progressbar {
    height: 5px;
    width: 0%;
    background: #2196f3;
  }

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

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

}
@layer components {

  .fc-left-sidebar-container {
    display: flex;
    background: #f5f5f5;
    align-items: stretch;
    /* border: 1px solid green; */
  }


  .fc-left-sidebar-menu-container {
    display: flex;
    flex-direction: column;
  }

  #fc-left-sidebar-submenu {
    position: relative;
    width: 8px;
    background: #f1f1f1;
    transition: width 0.6s;
    /* border: 1px solid red; */
    overflow: hidden;
  }

  #fc-left-sidebar-submenu-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.0rem;


  }


  #fc-left-sidebar-submenu.open-left {
    width: 120px;
    padding: 0%;
  }

  #fc-left-sidebar-submenu.open-down {
    height: 100px;
  }

  .fc-leftsidebar-submenu-toggler {
    position: absolute;
    top: calc(50% - 8px);
    right: 0px;
    width: 8px;
    height: 40px;
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
    cursor: pointer;
    box-shadow: 1px 3px 2px #ddd;
    background: #ccc;
    /* background: #f1f1f1; */
  }

  .fc-leftsidebar-submenu-toggler:hover {
    background: #7fdbff;
    box-shadow: none;
  }

 
  @media (max-width: 768px) {
    .fc-left-sidebar-container {
      order: 2;
      flex-direction: row;
      flex-wrap: wrap;
    }

    .fc-left-sidebar-menu-container {
      flex-direction: row;
      justify-content: center;
      flex-wrap: wrap;
    }

    #fc-left-sidebar-submenu-content {
      flex-direction: row;

    }



    #fc-left-sidebar-submenu {
      position: relative;
      width: 100%;
      height: 8PX;
      border-top: 1px solid #ccc;
      background: #f1f1f1;
      transition: height 1.25s;
      margin-bottom: 1.5rem;
    }

    .fc-leftsidebar-submenu-toggler {
      top: calc(100% - 8px);
      left: calc(50% - 20px);
      width: 40px;
      height: 8px;
      transform: translate(0%, 0%);
      border-top-right-radius: 0;
      border-bottom-left-radius: 5px;
      border-bottom-right-radius: 5px;
    }

    .fc-left-sidebar-button {
      padding: 0.5rem 0.5rem 0.2rem 0.5rem;
    }
  }
}
@layer components {

  #fc-right-sidebar {
    /* min-width set up in the config */
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
    padding: 0.5rem;
  }

  .fc-sub-title {
    padding: 0;
    /* margin-top: 0.2rem; */
    margin-bottom: 0.2rem;
    text-decoration-line: underline;
    font-size: 0.8rem;
  }

  #fc-rightsidebar-tools-container {
    position: relative;
    max-height: 400px;
    overflow-y: auto;
    transition: max-height 0.8s ease;

  }

  .truncate {
    width: 160px;
    /* обязательно фиксированная ширина */
    white-space: nowrap;
    /* в одну строку */
    overflow: hidden;
    /* скрыть лишнее */
    text-overflow: ellipsis;
    /* добавить ... */
  }

  /* for tools */
  .fc-filter-title {
    font-size: 0.8rem;
  }

  .fc-filter-range {
    display: block;
    accent-color: #424242;
  }

  .fc-filter-box {
    display: flex;
    justify-content: space-between;
  }

  /* crop  */
  label[for="fc-fix-size-check"] {
    cursor: pointer;
  }

  #fc-fix-size-check {
    accent-color: #7fdbff;
    /* изменит цвет галочки и фона под ней */
  }


  @media (max-width: 768px) {
    #fc-right-sidebar {
      order: 3;
      flex-direction: column-reverse;
    }
  }
}
@layer components {
  #fc-main-canvas-wraper {
    position: relative;
    flex-grow: 1;
    border: none;

  }

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

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

  @media (max-width: 768px) {
    #fc-main-canvas-wraper {
      height: 50vh !important;

    }
  }
}
@layer components {

  .fc-notification {
    position: absolute;
    /* width: 80%; */
    width: clamp(250px, 80%, 600px);
    max-width: 600px;
    top: 30%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.8rem 0.8rem;
    border: 1px solid #ddd;
    border-radius: 0.2rem;
    box-shadow: 0 0 5px 5px white;
    background: #d0efff;
    text-align: center;
  }
}
@layer components {

  #fc-historybar {
    position: relative;
  }

  .fc-historybar-title {
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content:center;
    padding: 5px 5px;
    cursor: pointer;
  }

  .fc-historybar-title:hover {
    background: #eee;
  }

  .fc-history-list {
    max-width: 100%;
    position: absolute;
    left: 0;
    top: 1.5rem;
    background-color: #f1f1f1;
    border: 1px solid #eee;
    box-shadow: 0px 2px 2px #dddddd;
    padding: 1rem;
    margin-top: 0.3rem;
    z-index: 10;
  }

  @media (max-width: 768px) {
    .fc-history-list {
      top: auto;
      bottom: 2.5rem;
      width: 60%;
    }
  }

  .fc-history-list-item {
    font-size: 0.8rem;
    cursor: pointer;
  }

  .fc-history-list-item:hover {
    color: #7fdbff;
  }
}
@layer components {

  #fc-service-modal {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
  }

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

  .fc-modal-panel {
    position: relative;
    width: min(720px, 92%);
    max-height: 86%;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .15);
    display: grid;
    grid-template-rows: auto 1fr auto;
    overflow: hidden;
    padding: 0;
    /* убрал паддинги, лучше вынести внутрь */
    transform: translateY(8px) scale(.98);
    opacity: 0;
    animation: pop-in .18s ease-out forwards;
  }

  .fc-modal-main {
    padding: 1rem;
  }


  .fc-modal-body {
    max-height: 400px;
    overflow-y: auto;
    padding: 0 16px;
  }

  .fc-modal-footer {
    padding: 12px 16px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
  }


  .fc-form-group {
    margin-bottom: 2rem;
  }

  .fc-print-label {
    display: block;
    margin-bottom: 0.5rem;
  }


  .fc-print-range {
    display: block;
    accent-color: #424242;
    width: 65%;
  }




  /*  do not used! Hover/active эффекты   */
  .fc-modal-btn:hover {
    transform: translateY(-1px);
  }

  .fc-modal-btn:active {
    transform: scale(.97);
  }

  /* Анимации */
  @keyframes fade-in {
    to {
      opacity: 1;
    }
  }

  @keyframes pop-in {
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }
}
