:root {
    --sketch-icon-color: #333333;
    --sketch-font-color: #000000;
    --sketch-bg-color: #ffffff;
    --sketch-bg2-color: #f1f1f1;
    --sketch-btn-color: #f1f1f1;
    --sketch-brd-color: #eeeeee;
    --sketch-cbg-color: #d7d7d7;
    --sketch-list-selected-color: #eeeeee;
    --sketch-bg3-color: #fcfcfc;
    --sketch-brd2-color: #333333;
    --sketch-bg-select-color: #f7f7f7;
    --sketch-filter-icon: none;
    --sketch-input-brd-color: #d4d4d4;
    --sketch-select-brd-color: #cccccc;
    --sketch-prl-bg-color: #f3f3f3;
    --sketch-draw-bg-color: #f5f5f5;
    --sketch-cbtn-color: #f4f4f4;
    --sketch-cbtn-brd:#d6d6d6;
    --sketch-cbtn-ref:#f7f7f7;
    --sketch-plpr-bg: #f2f9ff;
    --sketch-plpr-br:#bde3ff;
    --sketch-guide-link: #ffffff; 
    --sketch-input-color: #ffffff;
}
  
::webkit-scrollbar-track {
    background: var(--sketch-bg-color); /* Цвет трека (фона) скроллбара */
}
  
::webkit-scrollbar-thumb {
    background: #555; /* Цвет ползунка скроллбара */
}
  
::webkit-scrollbar-thumb:hover {
    background: #777; /* Цвет ползунка при наведении */
}
  
[data-theme="dark"] {
    --sketch-icon-color: #ffffff;
    --sketch-font-color: #ffffff;
    --sketch-bg-color: #696969;
    --sketch-bg2-color: #717171;
    --sketch-btn-color: #828282;
    --sketch-brd-color:#606060;
    --sketch-cbg-color:#828282;
    --sketch-list-selected-color:#828282;
    --sketch-bg3-color: #717171;
    --sketch-brd2-color:#ababab;
    --sketch-bg-select-color:#717171;
    --sketch-filter-icon:brightness(0) invert(1);
    --sketch-input-brd-color:#606060;
    --sketch-select-brd-color:#606060;
    --sketch-prl-bg-color:#606060;
    --sketch-draw-bg-color:#d5d5d5;
    --sketch-cbtn-color:#5e5e5e;
    --sketch-cbtn-brd:#656565;
    --sketch-cbtn-ref:#656565;
    --sketch-plpr-bg: #555555;
    --sketch-plpr-br:#555555;
    --sketch-guide-link: #b3b3b3; 
    --sketch-scroll-thumb: #4f4f4f; 
    --sketch-scroll-hover: #434343;
    --sketch-input-color: #828282; 
}
  
  
  
* {
    margin: 0;
    padding: 0;
    font-family: Geneva, Arial, Helvetica, sans-serif;
    color: var(--sketch-font-color);
    scrollbar-color: #555 var(--sketch-bg3-color); /* Цвет ползунка и трека */
}
html,
body {
  height: 100%;
  width: 100%;
  min-height: 480px;
  min-width: 320px;
  position: relative;
  overflow: hidden;
}
.auth {
	z-index: 99999;
	display:none;
  max-width: 400px;
  margin: 0 auto;
  text-align: center;
  background: #ffffff;
  position: fixed;
  top: 60px;
  left: 50%;
  margin-left: -200px;
  padding: 30px 40px 40px 40px;
  box-sizing: border-box;
  animation: ani 0.5s forwards;
  opacity: 0;
  border-radius:3px;
}
.show{
    display: block !important;
}
@keyframes ani {
    0% {opacity: 0;}
    100% {opacity: 1;}
}


.auth_menu{
  margin-right: 15px;
}


.auth_title {
    color: #333333;
    font-size: 22px;
    font-family: Geneva, Arial, Helvetica, sans-serif;
    line-height: 1.35;
    font-weight: 500;
    background-position: center center;
    margin-top: 10px;
}
.auth_welcome{
    color: #333333;
    font-size: 26px;
    font-family: Geneva, Arial, Helvetica, sans-serif;
    line-height: 1.35;
    font-weight: 500;
    background-position: center center;
    margin-bottom: 20px;
 
}
.auth_label {
    color: #333333;
    font-size: 16px;
    margin-top: 15px;
    margin-bottom: 0;
    text-align: left;
    line-height: 1.55;
    font-weight: 300;
    font-family: Geneva, Arial, Helvetica, sans-serif;
}
.auth_input {
    color: #333333;
    border: 1px solid #0D99FF;
    font-family: Geneva, Arial, Helvetica, sans-serif;
    background-color: #fff;
    font-size: 16px;
    font-weight: 400;
    height: 45px;
    display: inline-block;
    width: 100%;
    line-height: 1.33;
    padding: 0 20px;
    box-sizing: border-box;
    border-radius:3px;
    outline: 0;
}
.auth_message {
    font-size: 16px;
    line-height: 1.55;
    font-family: Geneva, Arial, Helvetica, sans-serif;
    font-weight: 300;
    color: red;
    text-align: center;
    margin-top: 10px;
}
.auth_button {
    margin-top: 20px;
    width: 100%;
    color: #fff;
    background-color: #0D99FF;
    font-weight: 600;
    font-size: 18px;
    border-radius:3px;
    height: 50px;
    padding: 0 15px;
    font-family: Geneva, Arial, Helvetica, sans-serif;
    text-align: center;
    border: 0 none;
    white-space: nowrap;
    background-image: none;
    cursor: pointer;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    outline: none;
	width:100%;
	position: relative;
	transition: all 0.2s;
}
.auth_button_loading::after {
	content: "";
	position: absolute;
	width: 16px;
	height: 16px;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	margin: auto;
	border: 4px solid transparent;
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: button-loading-spinner 1s ease infinite;
}
.auth_button_text{
    color:#ffffff;
}
.auth_button_loading .auth_button_text {
	visibility: hidden;
	opacity: 0;
}
@keyframes button-loading-spinner {
    from {
        transform: rotate(0turn);
    }

    to {
        transform: rotate(1turn);
    }
}
.auth_link {
    color: #0D99FF;
    font-size: 16px;
    line-height: 1.55;
    font-weight: 300;
    font-family: Geneva, Arial, Helvetica, sans-serif;
	cursor:pointer;
}
.auth_recovery{
    max-width: 400px;
    margin: 60px auto;
    text-align: center;
    background: #ffffff;
    padding: 30px 40px 40px 40px;
    box-sizing: border-box;
    border-radius: 3px;
}
.auth_login, .auth_sign{
	display:none;
	min-width:320px;
}

.auth_line{
    border-top: 2px solid #eeeeee;
    margin-bottom: 20px;
    margin-top: 20px;
}
.auth_google{
    border: 1px solid #0D99FF;
    width: 100%;
    display: flex;
    height: 50px;
    line-height: 50px;
    color: #0D99FF;
    text-decoration: none;
    border-radius: 3px;
    position: relative;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    font-size: 16px;
    cursor: pointer;
}
.auth_google::before{
    display: inline-flex;
    content: '';
    background-image: url(/img/google.svg);
    background-size: cover;
    height: 30px;
    width: 30px;
    position: relative;
    left: -5px;
    background-repeat: no-repeat;
}


.overlay{
	position: fixed;
  background: #333333;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
	display:none;
	z-index:99999;
  animation: ovrl 0.3s forwards;
  backdrop-filter: blur(5px);
  background: rgba(0, 0, 0, 0.6);
}
@keyframes ovrl {
    0% {opacity: 0;}
    100% {opacity: 1;}
}



  
  .sketch_magic_icon {
    height: 25px;
    width: 25px;
    display: inline-block;
    stroke-width: 0;
    stroke: var(--sketch-icon-color);
    fill: var(--sketch-icon-color);
    vertical-align: middle;
  }
  .sketch_menu{
    width: 90%;
    max-width: 500px;
    position: absolute;
    top: 100px;
    background: var(--sketch-bg-color);
    padding: 0;
    left: 50%;
    transform: translateX(-50%);
    margin-left: 0;
    box-sizing: border-box;
    border-radius: 8px;
    display: none;
    z-index: 99999;
    overflow: hidden;
    box-shadow: 0px 2px 14px rgba(0, 0, 0, 0.15), 0px 0px 0px 0.5px rgba(0, 0, 0, 0.2);
  }
.sketch_settings{
  font-size: 0;
  position: absolute;
  top: 60px;
  right: 15px;
  background: var(--sketch-bg-color);
  padding: 5px;
  box-shadow: rgba(0, 0, 0, 0.04) 0px 3px 5px;
  border-radius: 6px;
  transition: left 0.3s ease;
  z-index: 999;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  padding-right: 12px;
}
.sketch_icon{
  display: inline-block;
  width: 24px;
  height: 24px;
  stroke-width: 0;
  stroke: var(--sketch-icon-color);
  fill: var(--sketch-icon-color);
  vertical-align: middle;
}

.sketch_settings_button{
  height: 40px;
  cursor: pointer;
  border: 0;
  background: var(--sketch-bg-color);
  border-radius: 6px;
  display: flex;
  padding: 0 10px;
  font-size: 16px;
  align-items: center;
}

.sketch_settings_button:hover{
  background:var(--sketch-brd-color);
}
.sketch_settings_button img{
  height: 24px;
  width: 24px;
  margin-right: 5px;
  border-radius: 3px
}
.sketch_settings_row{
  display: flex;
}
.sketch_settings_input{
  height: 32px;
  cursor: pointer;
  border: 0;
  background: var(--sketch-input-color);
  border-radius: 6px;
  margin-right: 7px;
  display: flex;
  width: 80px;
  padding: 0 10px;
  font-size: 16px;
  border: 1px solid var(--sketch-brd-color);
  box-sizing: border-box;
  outline: none;
}
.sketch_settings_label{
  font-size: 16px;
  display: flex;
  align-items: center;
  margin-right: 7px;
}
.sketch_settings_measure{
  font-size: 16px;
  display: flex;
  align-items: center;
}
.sketch_measure_select{
  outline: 0;
  border:0;
  font-size: 14px;
  border-radius: 3px;
  cursor: pointer;
  background: var(--bg-color);
  height: 20px;
}
.sketch_measure_select:hover{
  background: var(--btn-color);
}

.sketch_selection_grid {
    display: none;
}
.sketch_settings_separator{
  font-size: 16px;
  display: flex;
  align-items: center;
  background: var(--sketch-brd-color);
  width: 2px;
  height: 20px;
  margin-left: 7px;
  margin-right: 17px;
}

.sketch_selection_list {
    display: flex;
    flex-direction: column;
    max-height: 65vh;
    overflow-y: auto;
    border-top: 1px solid var(--sketch-brd-color);
}

.sketch_selection_list::-webkit-scrollbar {
    width: 8px;
}

.sketch_selection_list::-webkit-scrollbar-track {
    background: var(--sketch-bg2-color);
    border-radius: 4px;
}

.sketch_selection_list::-webkit-scrollbar-thumb {
    background: var(--sketch-brd-color);
    border-radius: 4px;
}

.sketch_selection_list::-webkit-scrollbar-thumb:hover {
    background: var(--sketch-brd2-color);
}

.sketch_selection_item {
    width: 100%;
    height: 80px;
    overflow: hidden;
    cursor: pointer;
    border-bottom: 1px solid var(--sketch-brd-color);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    padding: 10px;
    flex-shrink: 0;
    box-sizing: border-box;
}

.sketch_selection_item:hover {
    /*border-color: var(--sketch-brd2-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);*/
    background: var(--sketch-bg-select-color);
}

.sketch_selection_item.selected {
    border-color: #1a73e8;
    background-color: rgba(26, 115, 232, 0.05);
}

.sketch_selection_image {
    height: 70px;
    width: 70px;
    min-width: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    border-radius: 5px;
}

.sketch_selection_image img {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
}

.sketch_selection_title {
    font-size: 16px;
}

@media (max-width: 480px) {
    .sketch_menu {
        width: 85%;
        padding: 20px;
    }
    
    .sketch_selection_list {
        max-height: 60vh;
    }
    
    .sketch_selection_item {
        padding: 8px;
    }
    
    .sketch_selection_image {
        height: 60px;
        width: 60px;
        min-width: 60px;
        margin-right: 10px;
    }
    
    .sketch_selection_title {
        font-size: 14px;
    }
}

.sketch{
  position: absolute;
  top: 0;
  left:0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 99999;
  transition: opacity 1s ease-in-out;
}

/* Стили для бокового меню */
.sketch_sidebar {
  position: absolute;
  top: 50px; /* Начинаем сразу под header */
  left: 0;
  width: 240px;
  height: calc(100% - 50px); /* Учитываем высоту header */
  background: var(--sketch-bg-color);
  z-index: 9998; /* Меньше чем у header */
  box-shadow: rgba(0, 0, 0, 0.04) 3px 0px 5px;
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.sketch_sidebar.collapsed {
  transform: translateX(-240px);
}

/* Кнопка открытия/закрытия сайдбара */
.sketch_sidebar_open_button {
  position: absolute;
  left: 240px; /* Ширина ai_sidebar */
  top: calc(50% + 25px); /* 50% высоты экрана + половина высоты header */
  transform: translateY(-50%);
  width: 30px;
  height: 40px;
  background: var(--sketch-bg-color);
  border: none;
  border-radius: 0 4px 4px 0;
  box-shadow: rgba(0, 0, 0, 0.04) 3px 0px 5px;
  cursor: pointer;
  z-index: 9999; /* Меньше чем у sidebar */
  display: flex; /* Всегда отображаем кнопку */
  align-items: center;
  justify-content: center;
  transition: left 0.3s ease, transform 0.3s ease;
}

.sketch_sidebar.collapsed ~ .sketch_sidebar_open_button {
  left: 0; /* Когда меню скрыто, кнопка прижимается к левому краю */
}

.sketch_sidebar_open_button:hover {
  background: var(--sketch-bg2-color);
}

/* Поворачиваем стрелку когда меню открыто */
.sketch_sidebar_open_button .sketch_toggle_icon {
  transition: transform 0.3s ease;
  display: inline-block;
}

/* Когда меню закрыто, стрелка указывает вправо (на открытие) */
.sketch_sidebar.collapsed ~ .sketch_sidebar_open_button .sketch_toggle_icon {
  transform: rotate(180deg);
}

/* Остальные стили для бокового меню */
.sketch_sidebar_header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border-bottom: 1px solid var(--sketch-brd-color);
  height: 50px;
  box-sizing: border-box;
}

.sketch_sidebar_title {
  font-size: 16px;
  font-weight: bold;
}

.sketch_sidebar_toggle {
  display: none;
}

.sketch_sidebar_content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.sketch_sidebar_item {
  width: 100%;
  cursor: pointer;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.sketch_sidebar_item:hover {
  border-color: #0d99ff;
  /*transform: translateY(-3px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.05);*/
}

.sketch_sidebar_item.active {
  background: var(--sketch-bg-select-color);
  border: 2px solid #0D99FF;
}

.sketch_sidebar_item.selected {
  background-color: #b3e0ff;
  border: 2px solid #0D99FF;
}

[data-theme="dark"] .sketch_sidebar_item.selected {
  background-color: #2a6b92;
  border: 2px solid #0D99FF;
}

.sketch_sidebar_item_image {
  width: 100%;
  height: 0;
  padding-bottom: 100%;
  position: relative;
  overflow: hidden;
  background: var(--sketch-bg2-color);
}

.sketch_sidebar_item_image img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
  user-select: none;
}

.sketch_sidebar_item_title {
  padding: 8px 10px;
  text-align: center;
  font-size: 14px;
  background: var(--sketch-bg-color);
}

/* Стилизация скроллбара в меню */
.sketch_sidebar_content::-webkit-scrollbar {
  width: 8px;
}

.sketch_sidebar_content::-webkit-scrollbar-track {
  background: var(--sketch-bg2-color);
  border-radius: 4px;
}

.sketch_sidebar_content::-webkit-scrollbar-thumb {
  background: var(--sketch-brd-color);
  border-radius: 4px;
}

.sketch_sidebar_content::-webkit-scrollbar-thumb:hover {
  background: var(--sketch-brd2-color);
}

/* Адаптация основных элементов для работы с меню */
.sketch_header {
  background-color: var(--sketch-bg-color);
  font-size: 0;
  width: 100%;
  height: 50px;
  border-bottom:1px solid var(--sketch-brd-color);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: rgba(0, 0, 0, 0.04) 0px 3px 5px;
  position: relative;
  z-index: 9999; /* Повышаем z-index для header */
}

.sketch_canvas {
  width: 100% !important; /* Всегда на всю ширину */
  transition: none;
}

/* Адаптация других элементов для смещения при открытии сайдбара */
.sketch_tools {
  font-size: 0;
  position: absolute;
  top: 60px;
  left: 255px; /* 240px + 15px */
  background: var(--sketch-bg-color);
  padding: 5px;
  box-shadow: rgba(0, 0, 0, 0.04) 0px 3px 5px;
  border-radius: 6px;
  transition: left 0.3s ease;
  z-index: 999; /* Обеспечиваем, чтобы инструменты были поверх остальных элементов */
  width: max-content;
}

.sketch_tools.sketch_full-width {
  left: 15px;
}

.sketch_generate {
  padding: 7px 15px;
  display: flex;
  align-items: center;
  font-size: 16px;
  border-radius: 50px;
  border: 0;
  cursor: pointer;
  width: 200px;
  height: 50px;
  box-sizing: border-box;
  background: var(--sketch-bg-color);
  opacity: 0.5;
  position: absolute;
  bottom: 20px;
  
  transform: translateX(-50%);
  box-shadow: rgba(0, 0, 0, 0.04) 0px 3px 5px;
  justify-content: center;
  transition: all 0.3s ease;
  left: calc(50% + 120px);
}

/* Смещаем кнопку генерации вправо при открытии меню */
.sketch_generate.sketch_shifted {
  left: 50%;
}

.sketch_hide {
  opacity: 0;
}
.sketch_title{
  font-size: 14px;
  padding-left: 15px;
  font-weight: bold;
}
.sketch_button{
  vertical-align: middle;
  height: 40px;
  cursor: pointer;
  border: 0;
  background: #0D99FF;
  border-radius: 6px;
  margin-right: 7px;
  display: inline-block;
  color: #ffffff;
  min-width: 70px;
  font-size: 16px;
  padding: 0 10px;
}
.sketch_active{
  background: var(--sketch-brd-color) !important;
}
.sketch_button:hover{
  background: #0a7acc;
}
.sketch_disabled{
  opacity: 0.5;
  cursor: not-allowed;
}
.sketch_canvas{
  background: var(--sketch-draw-bg-color);
  /*cursor: auto;*/
  cursor: url(../sketch/img/cursor-cursor.svg) 0 0, auto;
}
.sketch_pen_cursor{
  cursor: url(../sketch/img/pen-cursor.svg) 0 48, auto;
}
.sketch_exit{
  width: 50px;
  height: 50px;
  text-align: center;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.sketch_exit:hover{
  background: var(--sketch-bg-select-color);
}
.sketch_generate_icon {
  height: 30px;
  width: 30px;
  display: inline-block;
  stroke-width: 0;
  stroke: var(--sketch-icon-color);
  fill: var(--sketch-icon-color);
  vertical-align: middle;
  margin-right: 5px;
}
.sketch_button_circle{
  vertical-align: middle;
  display: inline-block;
  width: 40px;
  height: 40px;
  cursor: pointer;
  border: 0;
  background: var(--sketch-bg-color);
  border-radius: 6px;
  margin-right: 7px;
}
.sketch_logo{
  display: flex;
  align-items: center;
  position: relative;
  font-size: 0;
}
.sketch_button_circle:hover{
  background: var(--sketch-brd-color);;
}
.sketch_logo_link{
  display: block;
    fill: var(--sketch-font-color);
    color: #333333;
    font-size: 22px;
    text-decoration: none;
}

.sketch_size_window {
  width: 300px;
  position: absolute;
  top: 100px;
  background: var(--sketch-bg-color);
  padding: 24px;
  left: 50%;
  margin-left: -150px;
  box-sizing: border-box;
  border-radius: 2px;
  display: none;
  z-index: 99999;
  box-shadow: 0px 2px 14px rgba(0, 0, 0, 0.15),
    0px 0px 0px 0.5px rgba(0, 0, 0, 0.2);
  
}
.sketch_size_case {
  margin-bottom: 15px;
  margin-top: 10px;
  display: inline-block;
  width: 100%;
}

.sketch_pen::before{
  display: inline-flex;
  content: "";
  background-image: url(../sketch/img/pen.svg);
  background-size: 22px 22px;
  height: 22px;
  width: 22px;
  position: relative;
  top: 2px;
  left: 0px;
  background-repeat: no-repeat;
}
.sketch_cursor::before{
  display: inline-flex;
  content: "";
  background-image: url(../sketch/img/cursor.svg);
  background-size: 22px 22px;
  height: 22px;
  width: 22px;
  position: relative;
  top: 2px;
  left: 0px;
  background-repeat: no-repeat;
}
.sketch_group::before{
  display: inline-flex;
  content: "";
  background-image: url(../sketch/img/group.svg);
  background-size: 28px 28px;
  height: 28px;
  width: 28px;
  position: relative;
  top: 2px;
  left: 0px;
  background-repeat: no-repeat;
}
.sketch_ungroup::before{
  display: inline-flex;
  content: "";
  background-image: url(../sketch/img/ungroup.svg);
  background-size: 28px 28px;
  height: 28px;
  width: 28px;
  position: relative;
  top: 2px;
  left: 0px;
  background-repeat: no-repeat;
}
.sketch_delete::before{
  display: inline-flex;
  content: "";
  background-image: url(../sketch/img/delete.svg);
  background-size: 22px 22px;
  height: 22px;
  width: 22px;
  position: relative;
  top: 2px;
  left: 0px;
  background-repeat: no-repeat;
}
.sketch_redo{
  opacity: 0.3;
}
.sketch_redo::before{
  display: inline-flex;
  content: "";
  background-image: url(../sketch/img/forward_black.svg);
  background-size: 20px 20px;
  height: 20px;
  width: 20px;
  position: relative;
  top: 2px;
  left: 0px;
  background-repeat: no-repeat;
}
.sketch_undo{
  opacity: 0.3;
}
.sketch_undo::before{
  display: inline-flex;
  content: "";
  background-image: url(../sketch/img/reply_black.svg);
  background-size: 20px 20px;
  height: 20px;
  width: 20px;
  position: relative;
  top: 2px;
  left: 0px;
  background-repeat: no-repeat;
}
.sketch_overlay{
  background: url(../img/magic-overlay.gif), #23068e99;
  width: 100%;
  height: 100%;
  position: fixed;
  top:50px;
  left:0;
  z-index: 99999;
  opacity: 0;
  animation: fadeIn 1s ease-in-out forwards; 
  display: none;
}
.sketch_overlay_stop{
  width: 100%;
  height: 100%;
  position: fixed;
  top:50px;
  left:0;
  z-index: 9999;
  display: none;
  background: #333333;
  opacity: 0.7;
}
.sketch_overlay_settings{
  width: 100%;
  height: 100%;
  position: fixed;
  top:50px;
  left:0;
  z-index: 999;
  display: none;
  background: #333333;
  opacity: 0.7;
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.sketch_select {
  -webkit-appearance: none; 
  -moz-appearance: none;
  appearance: none;   
  padding: 5px 0;
  border: 1px solid var(--sketch-select-brd-color);
  border-radius: 3px;
  box-sizing: border-box;
  width: 100%;
  font-size: 12px;
  outline: none;
  background: #ffffff;
  text-indent: 5px;
  cursor: pointer;
  color: #333333;
}
.sketch_select option{
  color: #333333;
}
.sketch_label_title {
  font-size: 16px;
  margin-bottom: 5px;
}
.sketch_input {
  padding: 5px;
  border: 1px solid var(--sketch-input-brd-color);
  border-radius: 2px;
  box-sizing: border-box;
  width: 100%;
  font-size: 14px;
  height: 40px;
  color: #333333;
}
.sketch_input option{
  color: #333333;
}

.sketch_sidebar_item.selected::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 5px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background-color: #00cc00;
}

/* Стили для окна выбора материалов */
.sketch_materials_window {
    display: none; /* Скрыто по умолчанию */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--sketch-bg-color);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 999999; /* Выше, чем ai_overlay */
    min-width: 350px;
    box-sizing: border-box;
}

.sketch_materials_window.visible {
    display: block; /* Показываем окно */
}

.sketch_material-selector {
    display: flex;
    flex-direction: column;
    gap: 20px; /* Пространство между группами селекторов */
}

.sketch_selector-group {
    display: flex;
    flex-direction: column;
    gap: 8px; /* Пространство между label и select */
}

.sketch_selector-group label {
    font-weight: bold;
    font-size: 14px;
}
.sketch_selected-option-text{
    color:#333333;
}
.sketch_selected-option-text option{
    color:#333333;
}
.sketch_selector-group select {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    color:#333333;
    background-color: #fff;
    cursor: pointer;
    outline: 0;
}
.sketch_selector-group option {
    color:#333333;
}
#sketch_select-material-btn {
    padding: 12px 20px;
    background-color: #0D99FF;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px; /* Небольшой отступ сверху */
    align-self: center; /* Центрируем кнопку */
}

#sketch_select-material-btn:hover {
    background-color: #0a7acc;
}

/* Стили для кастомного селекта изображений */
.sketch_custom-select-container {
    position: relative;
}

.sketch_custom-select-trigger {
    width: 100%;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    font-size: 14px;
    box-sizing: border-box;
    outline: none;
}

.sketch_selected-option-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sketch_selected-option-img {
    width: 28px; /* Размер иконки в кнопке */
    height: 28px;
    object-fit: cover;
    border-radius: 3px;
    flex-shrink: 0;
}

.sketch_arrow {
    font-size: 12px;
    color: #555;
}

.sketch_custom-select-options {
    display: none; /* Скрыты по умолчанию */
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #fff;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
    max-height: 200px;
    overflow-y: auto;
}

.sketch_custom-select-options.visible {
    display: block;
}

.sketch_custom-select-option {
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.sketch_custom-select-option:hover {
    background-color: #f0f0f0;
}

.sketch_custom-select-option img {
    width: 40px; /* Размер картинки в опциях */
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.sketch_custom-select-option span {
    font-size: 14px;
    color:#333333;
}

/* Стилизация скроллбара для опций */
.sketch_custom-select-options::-webkit-scrollbar {
    width: 6px;
}

.sketch_custom-select-options::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.sketch_custom-select-options::-webkit-scrollbar-thumb {
    background: #aaa;
    border-radius: 3px;
}

.sketch_custom-select-options::-webkit-scrollbar-thumb:hover {
    background: #888;
}

#sketch_select-material-btn:hover {
    background-color: #0a7acc;
}

/* Стили для кастомных инпутов размера листа */
.sketch_custom-input-group {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #eee;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sketch_custom-input-group.hidden {
    display: none;
}

.sketch_custom-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333333;
}

.sketch_custom-input-row label {
    font-weight: normal; /* Отменяем bold из .selector-group label */
    font-size: 14px;
    width: 60px; /* Фиксированная ширина для выравнивания */
    flex-shrink: 0;
}

.sketch_custom-input-row input[type="number"] {
    flex-grow: 1;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
     color: #333333;
     outline: none;
}


/* Убираем стрелки у number инпутов (опционально) */
.sketch_custom-input-row input[type=number]::-webkit-inner-spin-button,
.sketch_custom-input-row input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.sketch_custom-input-row input[type=number] {
  -moz-appearance: textfield;
}


.sketch_custom-select-options::-webkit-scrollbar-thumb:hover {
    background: #888;
}

/* Стили для мобильной кнопки настроек и модального окна */
.sketch_settings_mobile_button {
    display: none; /* Скрыта по умолчанию */
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    line-height: 0; /* Убрать лишнее пространство */
}

.sketch_settings_mobile_button svg {
    fill: var(--sketch-icon-color); /* Цвет иконки */
    width: 24px;
    height: 24px;
}

.sketch_settings_modal {
    display: none; /* Скрыто по умолчанию */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--sketch-bg-color);
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.25);
    z-index: 99999; /* Выше чем оверлей и окно материалов */
    width: 90%;
    max-width: 350px;
    box-sizing: border-box;
}

.sketch_settings_modal.visible {
    display: block;
}

.sketch_settings_modal_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--sketch-brd-color);
}

.sketch_settings_modal_title {
    font-size: 16px;
    font-weight: bold;
}

.sketch_settings_modal_close {
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    line-height: 0;
}

.sketch_settings_modal_close .sketch_icon {
    width: 18px;
    height: 18px;
}

.sketch_settings_modal_content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px; /* Пространство между элементами */
}

.sketch_settings_modal_content .sketch_settings_button {
    width: 100%; /* Кнопка материала на всю ширину */
    justify-content: left; /* Центрировать контент кнопки */
    box-sizing: border-box;
    height: auto;
    padding: 12px 10px;
    border: 1px solid var(--sketch-brd-color); /* Добавим границу для ясности */
}

.sketch_settings_modal_content .sketch_settings_row.modal_row {
     /* Стили для строки глубины внутри модалки */
     /* Можно оставить как есть или добавить специфичные стили */
}

/* Медиа-запрос для мобильных */
@media (max-width: 767px) {
    .sketch_settings {
        /* На мобильных оставляем только кнопку */
        padding: 5px; /* Уменьшим паддинг если нужно */
        width: auto; /* Автоматическая ширина */
        bottom: 20px;
        top: auto;
    }
    .sketch_settings_desktop_content {
        display: none;
    }
    .sketch_settings_mobile_button {
        display: block;
    }
}

/* Стили для десктопа (если mobile-first, то эти стили вне медиа-запроса) */
@media (min-width: 768px) {
    .sketch_settings_mobile_button {
        display: none;
    }
    .sketch_settings_desktop_content {
        display: flex; /* Возвращаем flex для десктопа */
        align-items: center;
    }
}