/* Report order modal — standalone namespace (include via report-order-modal-bundle.ejs only) */

.report-order-modal {
  display: none;
  position: fixed;
  z-index: 1055;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4);
}

.report-order-modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.report-order-modal__dialog {
  background: #ffffff;
  margin: auto;
  padding: 0;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  text-align: center;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  position: relative;
  /* Fixed typography — do not inherit page base (order-history 11px vs index ~16px) */
  font-size: 13px;
  line-height: 1.45;
  font-family: inherit;
  color: #212529;
}

.report-order-modal__header {
  background: #f8f9fa;
  color: #212529;
  padding: 16px 20px;
  font-size: 16px;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #dee2e6;
}

.report-order-modal__title {
  text-align: left;
}

.report-order-modal__close {
  color: #6c757d;
  font-size: 24px;
  font-weight: 300;
  cursor: pointer;
  line-height: 1;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  padding: 0;
}

.report-order-modal__close:hover {
  color: #212529;
}

.report-order-modal__body {
  padding: 5px 20px;
}

.report-order-modal__body p {
  font-size: 13px;
  color: #495057;
  line-height: 1.5;
  margin-bottom: 3px;
  text-align: left;
}

.report-order-modal__order-info {
  background: #f8f9fa;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 5px;
}

.report-order-modal__order-info p {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.report-order-modal__info-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 20px;
  margin-bottom: 2px;
}

.report-order-modal__info-row p {
  margin: 0;
  flex: 1 1 140px;
  min-width: 0;
}

.report-order-modal__form {
  margin: 0;
}

.report-order-modal__autofill-decoy {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  pointer-events: none;
  left: -9999px;
  top: 0;
}

.report-order-modal__field {
  text-align: left;
}

.report-order-modal__content-label {
  display: block;
  float: left;
  margin-bottom: 4px;
  font-size: 13px;
}

.report-order-modal__content-field {
  clear: both;
  width: 100%;
  padding: 8px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  min-height: 120px;
  max-height: 200px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
  outline: none;
  background: #fff;
  font-size: 13px;
  font-family: inherit;
  line-height: 1.4;
  text-align: left;
}

.report-order-modal__content-field::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.report-order-modal__content-field::-webkit-scrollbar-track {
  background: transparent;
}

.report-order-modal__content-field::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.report-order-modal__content-field::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.35);
}

.report-order-modal__content-field:empty::before {
  content: attr(data-placeholder);
  color: #6c757d;
  pointer-events: none;
}

.report-order-modal__content-field:focus {
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.report-order-modal__field-error {
  color: red;
  display: none;
  font-size: 12px;
}

.report-order-modal__image-wrap {
  margin-top: 12px;
  width: 100%;
  text-align: left;
  clear: both;
}

.report-order-modal__image-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  flex-wrap: wrap;
  text-align: left;
}

.report-order-modal__image-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 4px 10px;
  font-size: 12px;
  line-height: 1.25;
  border: 1px solid #b6c2d6;
  border-radius: 4px;
  background: #f8f9fa;
  color: #212529;
  cursor: pointer;
  margin: 0;
  white-space: nowrap;
}

.report-order-modal__image-btn:hover {
  background: #eef2f7;
  border-color: #97aac7;
}

.report-order-modal__image-filename {
  flex: 1 1 140px;
  min-width: 0;
  font-size: 12px;
  color: #6c757d;
  line-height: 1.25;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  text-align: left;
}

.report-order-modal__image-preview {
  display: none;
  margin-top: 8px;
  max-width: 200px;
  max-height: 150px;
}

.report-order-modal__image-preview:not(:empty) {
  display: block;
}

.report-order-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 20px;
}

.report-order-modal__btn {
  padding: 10px 24px;
  border: 1px solid #dee2e6;
  cursor: pointer;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 400;
  min-width: 100px;
  transition: background-color 0.2s;
}

.report-order-modal__btn--primary {
  background: #007bff;
  color: #fff;
  border-color: #007bff;
}

.report-order-modal__btn--primary:hover {
  background: #0056b3;
  border-color: #0056b3;
}

.report-order-modal__btn--secondary {
  background: #6c757d;
  color: #fff;
  border-color: #6c757d;
}

.report-order-modal__btn--secondary:hover {
  background: #5a6268;
  border-color: #5a6268;
}

.report-order-modal__btn:disabled,
.report-order-modal__image-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

#reportOrderModal[aria-busy="true"] .report-order-modal__content-field,
#reportOrderModal[aria-busy="true"] .report-order-modal__image-wrap {
  opacity: 0.7;
}

@media (max-width: 576px) {
  .report-order-modal__dialog {
    width: 95%;
    margin: 20px;
  }

  .report-order-modal__body {
    padding: 5px 16px;
  }

  .report-order-modal__actions {
    flex-direction: column;
  }

  .report-order-modal__btn {
    width: 100%;
  }
}

.dark .report-order-modal__dialog {
  background: #181818;
  border-color: #3a3a3a;
  color: #eff0f1;
}

.dark .report-order-modal__header {
  background: #262626;
  color: #eff0f1;
  border-bottom-color: #3a3a3a;
}

.dark .report-order-modal__close {
  color: #c7cbd3;
}

.dark .report-order-modal__close:hover {
  color: #eff0f1;
}

.dark .report-order-modal__body {
  color: #eff0f1;
}

.dark .report-order-modal__body p {
  color: #c7cbd3;
}

.dark .report-order-modal__order-info {
  background: #262626;
  color: #c7cbd3;
}

.dark .report-order-modal__order-info p {
  color: #c7cbd3;
}

.dark .report-order-modal__body small {
  color: #ff6b6b;
}

.dark .report-order-modal__body strong {
  color: #eff0f1;
}

.dark .report-order-modal__content-field {
  background: #1e1e1e;
  border-color: #404040;
  color: #e5e5e5;
}

.dark .report-order-modal__content-field:empty::before {
  color: #888;
}

.dark .report-order-modal__content-field::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
}

.dark .report-order-modal__content-field::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35);
}

.dark .report-order-modal__btn--secondary {
  background: #3a3a3a;
  color: #eff0f1;
  border-color: #4a4a4a;
}

.dark .report-order-modal__btn--secondary:hover {
  background: #4a4a4a;
  border-color: #5a5a5a;
}

.dark .report-order-modal__image-btn {
  background: #2a2a2a;
  border-color: #3a3a3a;
  color: #eff0f1;
}

.dark .report-order-modal__image-btn:hover {
  background: #333;
  border-color: #4a4a4a;
}

.dark .report-order-modal__image-filename {
  color: #c7cbd3;
}
