.location-modal-dialog {
  max-width: 420px;
}

.location-modal-content {
  position: relative;
  border: 1px solid #dbe3ec;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 28px 56px rgba(15, 23, 42, 0.18);
}

.location-modal-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--intellect-brand-deep-bg, #152a45) 0%, var(--intellect-brand-primary) 100%);
  z-index: 1;
}

.location-modal-header {
  border-bottom: 1px solid #e8edf3;
  padding: 1.35rem 1.5rem 1.15rem;
  align-items: flex-start;
  background: #fff;
}

.location-modal-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.location-modal-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--intellect-brand-deep-bg, #152a45);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.18);
}

.location-modal-header .modal-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.location-modal-subtitle {
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.45;
}

.location-modal-body {
  padding: 1.15rem 1.5rem 1.25rem;
  background: #fff;
}

.location-detected-card {
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  border: 1px solid #dbe3ec;
  border-left: 3px solid var(--intellect-brand-primary);
  border-radius: 10px;
  padding: 1.05rem 1.15rem;
  text-align: left;
}

.location-detected-label {
  display: block;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 0.4rem;
}

.location-detected-value {
  font-size: 1.375rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.location-picker-label {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.75rem;
}

.location-region-grid {
  display: grid;
  gap: 0.65rem;
}

.location-region-card {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  text-align: left;
  border: 1px solid #dbe3ec;
  border-radius: 10px;
  background: #fff;
  padding: 0.95rem 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  cursor: pointer;
}

.location-region-card:hover:not(:disabled) {
  border-color: var(--intellect-brand-primary);
  background: #f8fafc;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.07);
}

.location-region-chevron {
  color: #94a3b8;
  font-size: 0.8rem;
  flex-shrink: 0;
  transition: color 0.2s ease, transform 0.2s ease;
}

.location-region-card:hover:not(:disabled) .location-region-chevron {
  color: var(--intellect-brand-primary);
  transform: translateX(2px);
}

.location-region-card:disabled {
  opacity: 0.7;
  cursor: wait;
}

.location-region-copy {
  min-width: 0;
}

.location-region-name {
  display: block;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0f172a;
}

.location-region-meta {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.2rem;
}

.location-modal-footer {
  border-top: 1px solid #e8edf3;
  padding: 1rem 1.5rem 1.35rem;
  flex-direction: column;
  gap: 0.55rem;
  background: #fafbfc;
}

/* Override global .btn { background: brand-primary } for modal actions */
.location-modal-footer .location-modal-primary-btn {
  background-color: var(--intellect-brand-primary) !important;
  border-color: var(--intellect-brand-primary) !important;
  color: #fff !important;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 10px !important;
  padding: 0.72rem 1rem;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--intellect-brand-primary) 28%, transparent);
}

.location-modal-footer .location-modal-primary-btn:hover,
.location-modal-footer .location-modal-primary-btn:focus {
  background-color: var(--intellect-brand-accent, var(--intellect-brand-primary)) !important;
  border-color: var(--intellect-brand-accent, var(--intellect-brand-primary)) !important;
  color: #fff !important;
}

.location-modal-footer .location-modal-secondary-btn {
  background-color: #fff !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 10px !important;
  padding: 0.68rem 1rem;
}

.location-modal-footer .location-modal-secondary-btn:hover,
.location-modal-footer .location-modal-secondary-btn:focus {
  background-color: #f1f5f9 !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}

#location-modal-footer-picker .btn-outline-secondary {
  background-color: #fff !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
  border-radius: 10px !important;
  font-weight: 600;
  font-size: 0.875rem;
}

#location-modal-footer-picker .btn-outline-secondary:hover,
#location-modal-footer-picker .btn-outline-secondary:focus {
  background-color: #f1f5f9 !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}
