/* Общий вид служебных форм (pages/forms/*.tsx). Подключается из _app через <link> — без webpack style-loader (React 19 / Next 16 dev). */
/* Вёрстка в духе «шапка PopUp» из старого online_arm-master. */

.formPage {
  max-width: 500px;
  margin: 0 auto;
  padding-bottom: 80px;
  box-sizing: border-box;
}

.formSubtitle {
  background-color: #279dd8;
  font-size: 28px;
  font-weight: 500;
  border-radius: 30px;
  padding: 10px 24px;
  display: block;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  margin-top: 16px;
  margin-bottom: 32px;
  text-align: center;
  box-sizing: border-box;
  color: #000;
}

/* ПК: сделаем "плашку" заголовка свободнее, чтобы текст не выглядел зажатым */
@media (min-width: 641px) {
  /* Повышаем специфичность, чтобы перебить стили MUI DialogTitle */
  .MuiDialogTitle-root.formSubtitle,
  .formSubtitle {
    padding: 14px 44px !important;
    border-radius: 36px;
    width: min(92%, 820px);
    max-width: 820px;
  }
}

.formRequestItem {
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 8px;
}

.formGroup {
  display: flex;
  flex-direction: column;
  margin-bottom: 15px;
  position: relative;
}

.formGroupInput {
  padding: 15px 30px;
  border: 1px solid #b0b0b0;
  border-radius: 30px;
  background-color: #ffe6cc;
  font-size: 18px;
  width: 100%;
  box-sizing: border-box;
  outline: none;
  font-family: inherit;
}

.formGroupInput:focus,
.formGroupInput:focus-visible {
  border-color: #000000;
  box-shadow: 0 0 0 1px #000000;
}

.formRequiredStar {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: red;
  font-size: 18px;
  font-weight: bold;
  pointer-events: none;
  z-index: 1;
}

.formGroup textarea ~ .formRequiredStar,
.formGroup [data-multiline] ~ .formRequiredStar {
  top: 12px;
  transform: none;
}

.formError {
  color: red;
  font-size: 18px;
  margin-top: 5px;
}

.formAddBlock {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 8px 10px;
}

.formAddBlock .formPlusCircle {
  cursor: pointer;
  margin-top: 4px;
}

.formAddLabel {
  font-size: 18px;
  font-weight: 500;
  color: #333;
  margin-bottom: 8px;
  text-align: center;
}

.formAddIcon {
  display: block;
  width: 44px;
  height: 44px;
  cursor: pointer;
  object-fit: contain;
}

/* Плюс в кружке — чёрные обводка и иконка */
.formPlusCircle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid #000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.formFileUpload {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: #ffe6cc;
  border: 1px solid #b0b0b0;
  border-radius: 30px;
  padding: 12px 24px;
  width: 100%;
  cursor: pointer;
  font-size: 18px;
  color: #666;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.formFileUpload:hover {
  background-color: #ffd6b3;
}

.formFileListMode {
  padding: 8px;
  cursor: default;
}

.formFileList {
  width: 100%;
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 8px;
}

.formFileItem {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #fff;
  border: 1px solid #b0b0b0;
  border-radius: 20px;
  padding: 4px 12px;
  margin-bottom: 4px;
  font-size: 18px;
}

.formFileItem span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.formFileItem button {
  background: none;
  border: none;
  color: #b3b3b3;
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
}

.formActionsBar {
  padding: 0 !important;
  margin: 0 !important;
}

.formSubmitBtnFull {
  width: 100% !important;
  min-height: 56px;
  padding: 16px 24px !important;
  border-radius: 0 !important;
  border: none !important;
  background-color: #ffb366 !important;
  color: #333 !important;
  font-size: 18px !important;
  font-weight: bold !important;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.formSubmitBtnFull:hover {
  background-color: #ffa04d !important;
}

.formSubmitBtnFull:disabled {
  opacity: 0.7;
  cursor: wait;
}

.formDialogClose {
  position: absolute !important;
  right: 16px !important;
  top: 16px !important;
  color: #333;
}


.formRemoveBtn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #999;
  padding: 0 4px;
}

.formRemoveBtn:hover {
  color: #333;
}
