/* ==========================================================================
   My Places — components (mp- namespace)
   Requires mp-tokens.css.
   ========================================================================== */

.icon {
  display: inline-flex;
  flex-shrink: 0;
}
.icon svg {
  width: 100%;
  height: 100%;
}

.mp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: var(--control-height);
  min-height: var(--tap-target-min);
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-primary);
  font-size: var(--font-size-footnote);
  font-weight: 500;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.mp-btn:hover { background: var(--surface-1); }
.mp-btn:active { transform: scale(0.98); }
.mp-btn:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; }

.mp-btn-primary {
  background: var(--brand-500);
  border-color: var(--brand-500);
  color: #fff;
}
.mp-btn-primary:hover { background: var(--brand-600); }

.mp-btn-success {
  background: var(--success-bg);
  border-color: var(--success-solid);
  color: var(--success-text);
}

.mp-btn-ghost {
  background: transparent;
  border-color: transparent;
}
.mp-btn-ghost:hover { background: var(--surface-1); }

.mp-btn-icon {
  width: var(--tap-target-min);
  height: var(--tap-target-min);
  padding: 0;
  flex-shrink: 0;
}

.mp-quick {
  padding: 0 0 8px;
}
.mp-quick__label {
  font-size: var(--font-size-caption);
  color: var(--text-muted);
  font-weight: 500;
  margin: 0 0 8px;
}
.mp-quick__row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.mp-quick__row::-webkit-scrollbar { display: none; }

.mp-chip {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 6px 12px;
  font-size: var(--font-size-footnote);
  white-space: nowrap;
  color: var(--text-primary);
  cursor: pointer;
}
.mp-chip .icon { color: var(--brand-500); }
.mp-chip--active {
  background: var(--brand-tint-bg);
  border-color: var(--brand-500);
}

.mp-section-header {
  padding: 12px 0 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mp-section-header__title {
  font-size: var(--font-size-body);
  font-weight: 500;
  margin: 0;
}
.mp-section-header__count {
  color: var(--text-muted);
  font-weight: 400;
}

.mp-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 0 8px;
}

.mp-card {
  display: flex;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  background: var(--surface-2);
  cursor: pointer;
}
.mp-card--active {
  border-color: var(--brand-500);
  background: var(--brand-tint-bg);
}

.mp-card__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mp-card__body {
  flex: 1;
  min-width: 0;
}

.mp-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mp-card__title {
  font-size: var(--font-size-body);
  font-weight: 500;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mp-card__address {
  font-size: var(--font-size-footnote);
  color: var(--text-secondary);
  margin: 4px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mp-card__actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.mp-card__actions .mp-btn {
  flex: 1;
  height: var(--tap-target-min);
  min-height: var(--tap-target-min);
  font-size: var(--font-size-footnote);
}

.mp-badge {
  font-size: var(--font-size-caption);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
  font-weight: 500;
}

[data-category="sightseeing"] { background: var(--cat-sightseeing-bg); color: var(--cat-sightseeing-text); }
[data-category="hotel"]       { background: var(--cat-hotel-bg);       color: var(--cat-hotel-text); }
[data-category="transit"]     { background: var(--cat-transit-bg);     color: var(--cat-transit-text); }
[data-category="food"]        { background: var(--cat-food-bg);        color: var(--cat-food-text); }
[data-category="shopping"]    { background: var(--cat-shopping-bg);    color: var(--cat-shopping-text); }
[data-category="home"]        { background: var(--cat-home-bg);        color: var(--cat-home-text); }
[data-category="other"]       { background: var(--cat-other-bg);       color: var(--cat-other-text); }

.mp-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-secondary);
}
.mp-empty .icon {
  color: var(--text-muted);
  margin: 0 auto 12px;
}
.mp-empty__title {
  font-size: var(--font-size-body);
  font-weight: 500;
  color: var(--text-primary);
  margin: 0 0 4px;
}
.mp-empty__body {
  font-size: var(--font-size-footnote);
  margin: 0 0 16px;
}

.mp-filter-empty {
  text-align: center;
  padding: 24px 16px;
  color: var(--text-secondary);
  font-size: var(--font-size-footnote);
}
