@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@400;600&display=swap');

body {
    background-color: #2C3E50;
    margin-left: 20px;
    margin-right: 20px;
    padding: 0;
}

*{
	font-family: "Comfortaa", sans-serif;
}


.container {
	max-width: 900px;
	margin: 50px auto;
	padding: 40px;
	border-radius: 20px;
	animation: fadeIn 0.8s ease-in-out;
}

h2 {
	text-align: center;
	color: #ffffff;
	font-weight: 700;
	margin-bottom: 30px;
}

label {
	display: block;
	margin-top: 15px;
	color: #ffffff;
	font-weight: 600;
	margin: 20px 0 10px;
}

input[type="text"],
input[type="url"],
textarea,
select {
	width: 100%;
	padding: 10px 14px;
	border-radius: 10px;
	border: 2px solid #ffd54f;
	color: black;
	font-size: 14px;
	transition: all 0.3s ease;
}


input:focus, textarea:focus, select:focus {
	border-color: #ffd54f;
	box-shadow: 0 0 10px #ffd54f33;
	outline: none;
}

textarea {
  resize: none;
  height: 100px;
}


@keyframes fadeIn {
	from { opacity: 0; transform: translateY(20px); }
	to { opacity: 1; transform: translateY(0); }
}








#iconPreview,
#imagesPreview {
    display: flex;
    flex-wrap: wrap;
    margin-top: 15px;
    gap: 10px;
}

  

.suggestions-list {
    position: absolute;
    background: #d2d2d2;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none; /* Скрыт по умолчанию */
	overflow: hidden;
}
.suggestion-item {
    padding: 10px;
    cursor: pointer;
}
.suggestion-item:hover {
    background: #7331ff;
    color: white;
}

.tag {
    background: #ffd231; color: black; padding: 5px 10px; 
    border-radius: 5px; display: inline-flex; align-items: center; 
    gap: 8px; margin: 5px; font-size: 12px; font-weight: bold;
}
.tag span { cursor: pointer; color: red; }







.preview-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 5px;
}

.preview-container img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 5px;
  position: relative;
  border: 1px solid #ccc;
}

.preview-container .delete-btn {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #7331ff;
  color: white;
  border: none;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  cursor: pointer;
  font-size: 12px;
  line-height: 16px;
}
.preview-container .img-wrapper {
  position: relative;
  display: inline-block;
}







/* 4. Когда идет загрузка */
.btn-main.is-loading .btn-loader {
    display: block; /* Показываем */
    animation: spin 0.8s linear infinite; /* Запускаем крутилку */
}

/* 5. Анимация БЕЗ использования translate, чтобы не сбивать центровку */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Скрываем текст */
.btn-main.is-loading .btn-text {
    display: none;
}



/* Контейнер-обертка */
.btn-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 20px 0;
}

.btn-main {
    position: relative; /* Обязательно для центровки спиннера */
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 320px;
    height: 60px;
    background-color: #ffeb3b;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
	font-size: 19px;
	padding: 10px;
    /* Ускорил анимацию до 0.3s, чтобы было резче и не лагало */
    transition: all 0.3s ease-in-out; 
    /* padding: 0; Убираем падинги, чтобы не косило центр */
    outline: none;
}

/* Состояние загрузки */
.btn-main.is-loading {
    min-width: 60px;
    width: 60px;
    border-radius: 50%;
    background: none;
}

/* Текст: просто скрываем */
.btn-main.is-loading .btn-text {
    opacity: 0;
    visibility: hidden;
}

/* Спиннер: ЖЕСТКАЯ ЦЕНТРОВКА */
.btn-loader {
    display: none;
    position: absolute; /* Вырываем из потока */
    top: 50%;
    left: 50%;
    /* Сдвигаем назад на половину его размера */
    margin-left: -15px; 
    margin-top: -15px;
    
    width: 30px;
    height: 30px;
    border: 4px solid #ffeb3b;
    border-left-color: #333;
    border-radius: 50%;
    box-sizing: border-box;
}

/* Включаем спиннер */
.btn-main.is-loading .btn-loader {
    display: block;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}







/* Уведомление */
.notification {
    position: fixed;
    top: 20px;
    right: -350px; /* Прячем за экраном */
    width: 300px;
    background-color: #ffd54f;
    color: black;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: right 0.5s ease-in-out;
    z-index: 10000;
    font-family: 'Comfortaa', sans-serif;
}

.notification.show {
    right: 30px; /* Выезжает */
}

/* Полоска прогресса */
.progress-bar {
    width: 100%;
    height: 5px;
    background-color: white;
    margin-top: 10px;
    border-radius: 5px;
    overflow: hidden;
}

.progress {
    width: 100%;
    height: 100%;
    background-color: #7331ff; /* Цвет твоей темы */
    /* Анимация берется из твоих настроек */
}

@keyframes progress {
    from { width: 100%; }
    to { width: 0%; }
}


/* Стили для тумблера */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #555;
  transition: .4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #ffd54f; /* Твой фирменный желтый */
}

input:checked + .slider:before {
  transform: translateX(26px);
}