/* Профиль сотрудника */

.employee-work-form {
  display: grid;
  gap: 18px;
}

/* Информация под именем */
.employee-profile-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 50px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 12px;
}

.employee-profile-meta span {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.employee-profile-meta strong {
  color: var(--text);
  font-weight: 600;
}

/* Текстовая информационная таблица */
.employee-info-table {
  display: grid;
}

.employee-info-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) minmax(0, 1.3fr);
  gap: 24px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.employee-info-row:first-child {
  border-top: 1px solid var(--line);
}

.employee-info-row > span {
  color: var(--muted);
  font-size: 13px;
}

.employee-info-row > strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.employee-info-note > strong {
  white-space: pre-wrap;
  line-height: 1.5;
}

/* Режим редактирования */
.employee-work-edit {
  display: grid;
  gap: 16px;
}

.employee-work-edit[hidden],
.employee-work-view[hidden],
.employee-absence-actions[hidden] {
  display: none;
}

/* Radio типа оплаты */
.employee-pay-type {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.employee-pay-type legend {
  margin-bottom: 9px;
  padding: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.employee-pay-type-options {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.employee-pay-type-options label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  cursor: pointer;
}

.employee-pay-type-options input[type='radio'] {
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
}

/* Убираем стрелки у ставки */
.employee-rate-input::-webkit-outer-spin-button,
.employee-rate-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.employee-rate-input[type='number'] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* Отпуск / больничный */
.employee-absence-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.employee-absence-actions .btn {
  width: 100%;
}

/* Редактирование */
.employee-edit-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.employee-edit-actions .btn {
  width: 100%;
}

/* Кнопка рядом с крестиком */
.employee-profile-edit-button {
  margin-left: auto;
  margin-right: 8px;
  width: auto;
}

/* Сотрудник в отпуске / больничном */
.absence-fixed-employee {
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.absence-fixed-employee span {
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 600px) {
  .employee-profile-meta {
    display: grid;
    gap: 4px;
  }

  .employee-info-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .employee-absence-actions,
  .employee-edit-actions {
    grid-template-columns: 1fr;
  }
}

/* Расстояние между датой приёма и стажем */
.employee-profile-meta {
  column-gap: 50px;
}

/* Иконка редактирования / сохранения в заголовке */
.employee-profile-edit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 38px;
  padding-inline: 10px;
}

.employee-profile-edit-icon {
  display: block;
  width: 18px;
  height: 18px;
  object-fit: contain;
}

/* Иконки Отпуск / Больничный */
.employee-action-icon {
  display: block;
  width: 17px;
  height: 17px;
  object-fit: contain;
  flex: 0 0 auto;
}

/* Вспомогательная кнопка в шапке модалки */
.modal-aux-button {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 40px;
  cursor: pointer;
}

.modal-aux-button:hover {
  background: var(--surface-soft);
}

.modal-aux-button img,
.modal-aux-button svg {
  width: 18px;
  height: 18px;
  display: block;
}

.employee-profile-edit-button {
  margin-left: auto;
  margin-right: 8px;
}

/* Единый стиль кнопок в шапке модалки */
.modal-header-button,
.modal-aux-button {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 40px;
  cursor: pointer;
}

.modal-header-button:hover,
.modal-aux-button:hover {
  background: var(--surface-soft);
}

.modal-header-button img,
.modal-header-button svg,
.modal-aux-button img,
.modal-aux-button svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* Кнопка закрытия использует тот же стиль, что и вспомогательная */
#modal-root .modal > header [data-close] {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 40px;
  cursor: pointer;
}

#modal-root .modal > header [data-close]:hover {
  background: var(--surface-soft);
}

#modal-root .modal > header [data-close] svg,
#modal-root .modal > header [data-close] img {
  width: 18px;
  height: 18px;
  display: block;
}
