/* Bottom-sheet modals, form fields, file attachments, and submit spinners. */

@keyframes appV2Spin {
  to {
    transform: rotate(360deg);
  }
}

/* — Modal overlay & shell — */

.locates-modal-wrap[hidden],
.reimb-modal-wrap[hidden] {
  display: none !important;
}

.locates-modal-wrap:not([hidden]),
.reimb-modal-wrap:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
}

.locates-modal,
.reimb-modal {
  background: #fff;
  border-radius: 20px;
  border: 1px solid rgba(255, 90, 0, 0.18);
  box-shadow: 0 20px 44px rgba(80, 30, 0, 0.14);
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 0 18px 18px;
}

.locates-modal {
  max-width: 640px;
}

.reimb-modal {
  max-width: 560px;
  padding-bottom: 24px;
}

.locates-modal-head,
.reimb-modal-head {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 5;
  padding: 18px 0 14px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 90, 0, 0.12);
}

.locates-modal-title,
.reimb-modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.locates-modal-close,
.reimb-modal-close {
  background: rgba(255, 90, 0, 0.08);
  border: 1px solid rgba(255, 90, 0, 0.22);
  border-radius: 10px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  cursor: pointer;
}

/* — Locates-style form (field ops modals) — */

.locates-form {
  display: flex;
  flex-direction: column;
}

.locates-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.locates-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.locates-field--full {
  grid-column: 1 / -1;
}

.locates-field label {
  font-weight: 700;
  font-size: 13px;
}

.locates-req {
  color: #d92d20;
}

.locates-field input,
.locates-field select,
.locates-field textarea {
  width: 100%;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: #fff;
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
}

.locates-field input,
.locates-field select {
  padding: 12px;
}

.locates-field textarea {
  padding: 12px;
  resize: vertical;
  min-height: 96px;
}

.locates-field select {
  appearance: none;
  padding-right: 48px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 18px 18px;
}

.locates-divider {
  height: 1px;
  width: 100%;
  background: rgba(0, 0, 0, 0.07);
  margin: 6px 0 18px;
}

.locates-hint {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  min-height: 16px;
}

.locates-file-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 90, 0, 0.1);
  border: 1px solid rgba(255, 90, 0, 0.25);
  cursor: pointer;
  font-weight: 800;
}

.locates-file-label input {
  display: none;
}

.locates-file-list {
  margin-top: 8px;
}

.locates-file-empty {
  font-size: 12px;
  color: var(--muted);
}

.locates-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  margin-bottom: 8px;
}

.locates-file-name {
  font-size: 13px;
  font-weight: 700;
}

.locates-file-sub {
  font-size: 12px;
  color: var(--muted);
}

.locates-file-remove {
  border: 1px solid var(--border);
  background: #f2f2f2;
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
}

.locates-actions {
  margin-top: 4px;
}

.locates-submit-btn,
.locates-submit {
  width: 100%;
  border: none;
  border-radius: var(--radius-pill, 999px);
  min-height: 49px;
  padding: 14px 16px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.locates-submit-btn:disabled,
.locates-submit:disabled {
  background: rgba(0, 0, 0, 0.16);
  cursor: not-allowed;
}

.locates-submit-btn.is-loading,
.locates-submit.is-loading {
  cursor: wait;
  pointer-events: none;
}

.locates-btn-spinner,
.reimb-btn-spinner,
.app-btn-spinner {
  display: none;
  width: 1.1em;
  height: 1.1em;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: appV2Spin 0.65s linear infinite;
}

.locates-submit-btn.is-loading .locates-btn-spinner,
.locates-submit.is-loading .locates-btn-spinner,
.reimb-submit-btn.is-loading .reimb-btn-spinner,
.is-loading > .app-btn-spinner {
  display: inline-block;
}
.locates-modal,
.reimb-modal {
  overflow-x: hidden;
  box-sizing: border-box;
}

.locates-modal *,
.reimb-modal * {
  box-sizing: border-box;
}

.locates-field {
  min-width: 0;
  max-width: 100%;
}

.locates-field input,
.locates-field select,
.locates-field textarea,
.reimb-field input,
.reimb-field select,
.reimb-field textarea {
  max-width: 100%;
  min-width: 0;
}

.locates-field input[type="date"],
.reimb-field input[type="date"],
.locates-field input[type="datetime-local"],
.reimb-field input[type="datetime-local"] {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: block;
  box-sizing: border-box;
}