/* Меню «три точки», строка состояния заявок и окно заявки.
 *
 * В паре с order-requests.js. Цвета берутся из общих переменных страниц
 * (--surface, --text, --text-muted, --line, --brand, --danger), которые сами
 * переключаются вместе с темой.
 */

.orq-kebab {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.orq-kebab svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  stroke: none;
}

.orq-kebab:hover,
.orq-kebab[aria-expanded="true"] {
  border-color: var(--text-muted);
  color: var(--text);
}

.orq-menu {
  position: fixed;
  z-index: 10500;
  min-width: 230px;
  max-width: calc(100vw - 16px);
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}

.orq-menu[hidden] { display: none; }

.orq-menu__item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.orq-menu__item small {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

.orq-menu__item:hover:not(:disabled) {
  background: rgba(127, 127, 127, 0.12);
}

.orq-menu__item:disabled {
  color: var(--text-muted);
  cursor: default;
}

.orq-status {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 0;
}

.orq-chip {
  display: inline-block;
  max-width: 100%;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.orq-chip b {
  color: var(--text);
  font-weight: 600;
}

.orq-chip__cancel {
  margin-left: 8px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--danger);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.orq-modal__input[hidden],
.orq-modal__address[hidden] { display: none; }

.orq-modal__address {
  margin-top: 14px;
}

.orq-modal__address .orq-modal__attach-label {
  display: block;
}

.orq-chip--pending,
.orq-chip--in_progress { border-color: var(--brand); }
.orq-chip--rejected { border-color: var(--danger); }

.orq-modal {
  position: fixed;
  inset: 0;
  z-index: 10600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.55);
}

.orq-modal[hidden] { display: none; }

.orq-modal__card {
  width: 100%;
  max-width: 420px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
}

.orq-modal__title {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
}

.orq-modal__hint {
  margin: 0 0 14px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
}

.orq-modal__input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  line-height: 1.45;
  resize: vertical;
}

.orq-modal__input:focus {
  outline: none;
  border-color: var(--brand);
}

.orq-modal__price {
  margin: -6px 0 14px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.orq-modal__price[hidden],
.orq-modal__attach[hidden] { display: none; }

.orq-modal__attach {
  margin-top: 14px;
}

.orq-modal__attach-label {
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 13px;
}

.orq-modal__thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.orq-modal__thumbs:not(:empty) {
  margin-bottom: 10px;
}

.orq-thumb {
  position: relative;
  width: 64px;
  height: 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.orq-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.orq-thumb__remove {
  position: absolute;
  top: 2px;
  right: 2px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.orq-modal__attach-btn {
  flex: none;
  width: 100%;
  border-style: dashed;
}

.orq-modal__card {
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}

.orq-modal__error {
  margin-top: 10px;
  color: var(--danger);
  font-size: 13px;
  font-weight: 600;
}

.orq-modal__actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.orq-btn {
  flex: 1;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.orq-btn--primary {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--surface);
}

.orq-btn:disabled {
  opacity: 0.6;
  cursor: default;
}
