/* TaxiRadar main app — extends dashboard.css */

body.dashboard-body::selection {
  background: rgba(232, 185, 35, 0.35);
}

.app-shell {
  max-width: 28rem;
  margin: 0 auto;
  min-height: 100dvh;
  padding: max(0.75rem, env(safe-area-inset-top)) 1rem 1.5rem;
}

.is-hidden {
  display: none !important;
}

/* Alerts */
.tr-alert {
  border-radius: var(--tr-radius);
  border: 1px solid var(--tr-gold-border);
  background: rgba(120, 53, 15, 0.25);
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: #fde68a;
}

.tr-alert__title {
  margin: 0 0 0.25rem;
  font-weight: 600;
  color: #fcd34d;
}

.tr-alert p {
  margin: 0;
  line-height: 1.45;
  color: rgba(253, 230, 138, 0.9);
}

/* Status HUD (availability hero) */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--tr-card-border);
  background: var(--tr-bg-elevated);
  color: var(--tr-muted);
}

.status-pill__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: #f87171;
}

.status-pill--available {
  border-color: rgba(52, 211, 153, 0.35);
  color: #a7f3d0;
}

.status-pill--available .status-pill__dot {
  background: var(--tr-success);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.6);
}

.status-headline {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--tr-text);
}

.status-headline--available {
  color: #a7f3d0;
}

.status-sub {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
  color: var(--tr-muted);
  line-height: 1.45;
}

.coords-box {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--tr-radius);
  border: 1px solid var(--tr-card-border);
  background: var(--tr-bg);
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  text-align: left;
}

.coords-box__label {
  display: block;
  color: var(--tr-muted-dim);
  margin-bottom: 0.25rem;
}

.coords-box__value {
  color: var(--tr-text);
}

/* Key–value list */
.kv-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.kv-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--tr-card-border);
  font-size: 0.875rem;
}

.kv-row:last-child {
  border-bottom: none;
}

.kv-row__key {
  color: var(--tr-muted);
}

.kv-row__value {
  color: var(--tr-text);
  text-align: right;
  font-weight: 500;
}

.kv-row__value--active {
  color: var(--tr-gold);
}

.kv-hint {
  margin: 0.75rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px solid var(--tr-card-border);
  font-size: 0.75rem;
  color: var(--tr-muted-dim);
  line-height: 1.4;
}

/* Profile preview block */
.profile-preview__row {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.profile-preview__badge-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.profile-preview__intro {
  margin: 0;
  font-size: 0.875rem;
  color: var(--tr-muted);
  font-style: italic;
  text-align: center;
  line-height: 1.45;
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.tr-link {
  display: inline-block;
  margin-top: 1.25rem;
  text-align: center;
  width: 100%;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--tr-gold);
  text-decoration: none;
}

.tr-link:hover {
  color: var(--tr-gold-bright);
}

.tr-footnote {
  margin: 1rem 0 0;
  text-align: center;
  font-size: 0.75rem;
  color: var(--tr-muted-dim);
  line-height: 1.45;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
}

@media (min-width: 480px) {
  .modal-backdrop {
    align-items: center;
  }
}

.modal-panel {
  width: 100%;
  max-width: 28rem;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: var(--tr-radius-lg);
  border: 1px solid var(--tr-card-border);
  background: var(--tr-card);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.modal-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--tr-card-border);
  position: sticky;
  top: 0;
  background: var(--tr-card);
  z-index: 1;
}

.modal-panel__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
}

.modal-panel__body {
  padding: 1rem;
}

.tr-field {
  margin-bottom: 1rem;
}

.tr-field label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--tr-muted);
}

.tr-input,
.tr-textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: var(--tr-radius);
  border: 1px solid var(--tr-card-border);
  background: var(--tr-bg);
  color: var(--tr-text);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.tr-input:focus,
.tr-textarea:focus {
  border-color: var(--tr-gold-border);
  box-shadow: 0 0 0 2px var(--tr-gold-dim);
}

.tr-textarea {
  resize: none;
  min-height: 5rem;
}

.tr-readonly {
  padding: 0.65rem 0.85rem;
  border-radius: var(--tr-radius);
  border: 1px solid var(--tr-card-border);
  background: var(--tr-bg);
  font-size: 0.875rem;
  color: var(--tr-muted);
}

.tr-field-hint {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  color: var(--tr-muted-dim);
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  padding-top: 0.5rem;
}

.modal-actions .tr-btn {
  flex: 1;
}

.profile-photo-upload {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.profile-photo-upload__preview {
  width: 5rem;
  height: 5rem;
  border-radius: 9999px;
  object-fit: cover;
  border: 2px solid var(--tr-gold-border);
  background: #000;
  flex-shrink: 0;
}

.profile-photo-upload__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

.profile-photo-upload__pick {
  cursor: pointer;
  margin: 0;
}

.profile-photo-upload__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
