/* PetGuard — shared component styles, built on tokens.css */

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container-wide {
  max-width: 720px;
}

/* --- top bar --- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0 0 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--pg-primary);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.brand span {
  color: var(--pg-ink);
}

.brand-logo {
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: block;
}

.topbar-action {
  font-size: 13px;
  color: var(--pg-ink-soft);
  font-weight: 500;
  background: none;
  border: none;
  cursor: pointer;
}

/* --- buttons --- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--pg-radius-pill);
  padding: 15px 22px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  text-align: center;
  transition: transform 0.08s ease, box-shadow 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--pg-primary);
  color: #fff;
  box-shadow: var(--pg-shadow-soft);
}

.btn-primary:hover {
  background: var(--pg-primary-deep);
}

.btn-teal {
  background: var(--pg-teal);
  color: #fff;
}

.btn-alert {
  background: var(--pg-alert);
  color: #fff;
  box-shadow: 0 14px 28px -10px rgba(140, 45, 16, 0.45);
}

.btn-alert:hover {
  background: var(--pg-alert-deep);
}

.btn-ghost {
  background: transparent;
  color: var(--pg-ink);
  border: 1.4px solid var(--pg-ink-faint);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 9px 16px;
  font-size: 13px;
}

.btn-tint {
  background: var(--pg-primary-tint);
  color: var(--pg-primary-deep);
}

.link-muted {
  display: block;
  text-align: center;
  font-size: 13px;
  color: var(--pg-ink-soft);
  font-weight: 500;
  margin-top: 10px;
}

/* --- form --- */

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--pg-ink-soft);
  margin-bottom: 6px;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1.4px solid rgba(22, 35, 43, 0.14);
  border-radius: var(--pg-radius-sm);
  padding: 12px 14px;
  font-size: 14.5px;
  font-family: var(--pg-font-body);
  background: var(--pg-surface);
  color: var(--pg-ink);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--pg-primary);
}

.field-hint {
  font-size: 11.5px;
  color: var(--pg-ink-faint);
  margin-top: 5px;
}

.field-row {
  display: flex;
  gap: 12px;
}

.field-row .field {
  flex: 1;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
}

.checkbox-row input {
  width: auto;
}

.checkbox-row label {
  margin: 0;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--pg-ink);
}

/* --- panels / cards --- */

.panel {
  background: var(--pg-surface-warm);
  border-radius: var(--pg-radius-md);
  padding: 16px 18px;
}

.panel-surface {
  background: var(--pg-surface);
  border-radius: var(--pg-radius-md);
  padding: 14px 16px;
  box-shadow: var(--pg-shadow-tight);
}

.section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--pg-ink-faint);
  margin: 0 0 10px 0;
}

/* --- chips / pills --- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--pg-radius-pill);
  padding: 7px 13px;
  font-size: 12px;
  font-weight: 600;
}

.chip-teal {
  background: var(--pg-teal);
  color: #fff;
}

.chip-alert {
  background: var(--pg-alert-tint);
  color: var(--pg-alert-deep);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot.normal {
  background: var(--pg-teal);
}

.status-dot.lost {
  background: var(--pg-alert);
}

/* --- rows (dashboard pet list) --- */

.pet-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 4px;
  border-bottom: 1px solid rgba(22, 35, 43, 0.07);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.pet-row:hover {
  background: rgba(22, 35, 43, 0.03);
}

.pet-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--pg-teal-tint);
  color: var(--pg-teal);
  overflow: hidden;
}

.pet-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pet-avatar.is-lost {
  background: var(--pg-alert-tint);
  color: var(--pg-alert-deep);
}

.pet-row-info {
  flex: 1;
}

.pet-row-name {
  font-weight: 600;
  font-size: 15px;
}

.pet-row-status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  font-size: 11.5px;
  font-weight: 600;
}

.pet-row-status.normal {
  color: var(--pg-ink-soft);
}

.pet-row-status.lost {
  color: var(--pg-alert-deep);
}

/* --- alert banner (lost) --- */

.alert-banner {
  background: var(--pg-alert-tint);
  padding: 14px 0;
  display: flex;
  align-items: center;
  gap: 11px;
}

.alert-banner-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--pg-alert);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.alert-banner-title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--pg-alert-deep);
}

.alert-banner-sub {
  margin: 2px 0 0 0;
  font-size: 11px;
  color: var(--pg-alert-deep);
  opacity: 0.8;
}

/* --- photo header (public profile) --- */

.photo-header {
  position: relative;
  height: 300px;
  border-radius: 0 0 var(--pg-radius-lg) var(--pg-radius-lg);
  overflow: hidden;
  background: linear-gradient(160deg, var(--pg-teal-tint) 0%, var(--pg-primary-tint) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-header img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 55%, rgba(22, 35, 43, 0.45) 100%);
  pointer-events: none;
}

.photo-header-badge {
  position: absolute;
  bottom: 16px;
  left: 20px;
  z-index: 1;
}

/* --- misc --- */

.spacer {
  flex: 1;
}

.center-text {
  text-align: center;
}

.muted {
  color: var(--pg-ink-faint);
  font-size: 11.5px;
}

.error-message {
  background: var(--pg-alert-tint);
  color: var(--pg-alert-deep);
  border-radius: var(--pg-radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 14px;
}

.success-message {
  background: var(--pg-teal-tint);
  color: var(--pg-teal);
  border-radius: var(--pg-radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 14px;
}

[hidden] {
  display: none !important;
}

.icon {
  display: inline-flex;
  flex-shrink: 0;
}

.bottom-tabbar {
  height: 74px;
  background: var(--pg-surface);
  border-top: 1px solid rgba(22, 35, 43, 0.07);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding-bottom: 8px;
  margin: 0 -20px;
  position: sticky;
  bottom: 0;
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--pg-ink-faint);
  text-decoration: none;
  font-size: 10px;
  font-weight: 500;
  position: relative;
}

.tab-item.active {
  color: var(--pg-primary);
  font-weight: 600;
}

.photo-thumb-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.photo-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--pg-radius-sm);
  overflow: hidden;
  background: var(--pg-surface-warm);
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-thumb-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: none;
  font-size: 13px;
  cursor: pointer;
}

@media (max-width: 400px) {
  .container {
    padding: 0 16px;
  }
}

/* --- footer (public/marketing pages only) --- */

.site-footer {
  margin-top: 40px;
  padding: 24px 0 30px 0;
  border-top: 1px solid rgba(22, 35, 43, 0.08);
  text-align: center;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 12px;
}

.footer-social a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--pg-surface-warm);
  color: var(--pg-ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.footer-social a:hover {
  background: var(--pg-primary-tint);
  color: var(--pg-primary);
}

.footer-copy {
  font-size: 11.5px;
  color: var(--pg-ink-faint);
  margin: 0;
}
