/* /css/modal.css */

/* Оверлей */
.modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;              /* по умолчанию скрыт */
  align-items: center;
  justify-content: center;
  z-index: 10000;
}
.modal-overlay.active {
  display: flex;              /* когда нужно показать */
}

/* Окошко самой модалки */
.modal {
  background: #1f1f1a;
  padding: 24px;
  border-radius: 12px;
  max-width: 725px;
  width: 100%;
  z-index: 10001;
}
.modal h2 {
    text-align: center;
  margin-top: 0px;
  margin-bottom: 12px;
  color: #cab170;

}
/* Контейнер полей: всё по центру */
.modal .modal-fields {
  display: grid;
  grid-template-columns: max-content 1fr; /* слева подгонка по ширине span, справа — input растягивается */
  row-gap: 12px;
  column-gap: 16px;
  align-items: center;
}

/* Каждая пара «лейбл + инпут» в ряд */
.modal .modal-field-label {
  color: #fff;
  /* можете добавить текст-правый отступ, если нужно */
}

/* Контейнер кнопок */
.modal .modal-buttons {
  margin-top: 18px;
  display: flex;
  gap: 12px;
  justify-content: center;
}

.modal .modal-field-input {
  width: 100%;
    background: rgba(14, 15, 17, 0.70);
  border: 1px solid rgba(202, 176, 113, 0.16);
  color: #fff;
  font-size: 14px;
  padding: 7px 12px;
  border-radius: 8px;
  transition: border-color 0.18s, background 0.18s;
}


/* Когда фокус на любом .input */
.modal .modal-field-input:focus {
  border-color: #cab170;
  outline: none;
  background: rgba(202, 176, 113, 0.04);
}

/* Скрываем дефолтную рамку, выравниваем по остальным инпутам */
.modal .modal-field-input[type="file"] {
  width: 100%;
  padding: 7px 12px;
  background: rgba(14, 15, 17, 0.70);
  border: 1px solid rgba(202, 176, 113, 0.16);
  color: #fff;
  font-size: 14px;
  border-radius: 8px;
  transition: border-color 0.18s, background 0.18s;
  cursor: pointer;
}

/* Когда фокус на поле */
.modal .modal-field-input[type="file"]:focus {
  border-color: #cab170;
  outline: none;
  background: rgba(202, 176, 113, 0.04);
}

/* Стили для кнопки “Обзор” в разных браузерах */

/* Chrome, Edge, Safari */
.modal .modal-field-input[type="file"]::-webkit-file-upload-button {
  background: #cab170;
  border: none;
  padding: 6px 10px;
  margin-right: 8px;
  border-radius: 6px;
  color: #1f1f1a;
  font-size: 14px;
  cursor: pointer;
}

/* Firefox */
.modal .modal-field-input[type="file"]::file-selector-button {
  background: #cab170;
  border: none;
  padding: 6px 10px;
  margin-right: 8px;
  border-radius: 6px;
  color: #1f1f1a;
  font-size: 14px;
  cursor: pointer;
}

/* IE10+ */
.modal .modal-field-input[type="file"]::-ms-browse {
  background: #cab170;
  border: none;
  padding: 6px 10px;
  margin-right: 8px;
  border-radius: 6px;
  color: #1f1f1a;
  font-size: 14px;
  cursor: pointer;
}

/* Файл-input в отключённом состоянии полупрозрачный */
.modal .modal-field-input[type="file"]:disabled {
  opacity: 0.5;
}


/* контейнер для строки flag */
.modal-file-row {
  display: flex;
  align-items: center;

}

/* лейбл растягивается, занимая всё доступное место */
.modal-file-label {
  color: #fff;
  cursor: pointer;
  flex: 1;        /* grow = 1, shrink = 1, basis = 0 */
  /* если нужно минимальное базовое, можно flex: 1 1 0; */
    -webkit-user-select: none; /* Safari, Chrome */
     -moz-user-select: none; /* Firefox */
      -ms-user-select: none; /* IE/Edge */
          user-select: none; /* стандарт */
}

.modal-file-label { flex: 0 0 90px; }




