/* ==========================================================================
   Diaper Dad Pro — Styles
   Mobile-first responsive design
   Primary: Teal #0d7377 | Secondary: Dark Blue #14274e | CTA: Orange #ff6b35
   ========================================================================== */

/* ---------- CSS Custom Properties ---------- */
:root {
  --color-primary: #0d7377;
  --color-primary-light: #10948f;
  --color-primary-dark: #095a5d;
  --color-secondary: #14274e;
  --color-secondary-light: #1b3a6b;
  --color-cta: #ff6b35;
  --color-cta-hover: #e85a28;
  --color-cta-light: rgba(255, 107, 53, 0.12);
  --color-success: #27ae60;
  --color-warning: #f39c12;
  --color-danger: #e74c3c;
  --color-bg: #f5f7fa;
  --color-white: #ffffff;
  --color-text: #2c3e50;
  --color-text-light: #6b7c93;
  --color-text-muted: #95a5b8;
  --color-border: #e1e8ef;
  --color-border-light: #f0f3f7;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 12px 40px rgba(0, 0, 0, 0.2);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;
  --nav-height: 64px;
  --header-height: 60px;
  --transition: 0.2s ease;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overflow: hidden;
  font-family: var(--font-family);
  font-size: 16px;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  font-size: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

/* ---------- App Layout ---------- */
#app {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  position: relative;
}

/* ---------- Header ---------- */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  padding: 0 12px;
  background: var(--color-secondary);
  color: var(--color-white);
  z-index: 100;
  flex-shrink: 0;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.1rem;
  white-space: nowrap;
}

.header-brand .brand-icon {
  font-size: 1.4rem;
}

.header-brand .brand-text-short {
  display: inline;
}

.header-brand .brand-text-full {
  display: none;
}

.header-search {
  display: none;
  flex: 1;
  max-width: 400px;
  margin: 0 16px;
  position: relative;
}

.header-search input {
  width: 100%;
  height: 36px;
  padding: 0 12px 0 36px;
  border: none;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.15);
  color: var(--color-white);
  font-size: 0.875rem;
  outline: none;
  transition: background var(--transition);
}

.header-search input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.header-search input:focus {
  background: rgba(255, 255, 255, 0.25);
}

.header-search .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-search-mobile {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  color: var(--color-white);
  transition: background var(--transition);
}

.btn-search-mobile:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-sign-in {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius-full);
  background: var(--color-cta);
  color: var(--color-white);
  font-size: 0.8rem;
  font-weight: 600;
  transition: background var(--transition);
  white-space: nowrap;
}

.btn-sign-in:hover {
  background: var(--color-cta-hover);
}

.btn-sign-in.signed-in {
  background: var(--color-primary);
  padding: 0 8px;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.header-about-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  color: rgba(255, 255, 255, 0.7);
  transition: all var(--transition);
  font-size: 0.9rem;
  font-weight: 700;
}

.header-about-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-white);
}

/* ---------- Profile Dropdown ---------- */
.profile-dropdown {
  position: absolute;
  top: calc(var(--header-height) - 4px);
  right: 12px;
  width: 240px;
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  overflow: hidden;
  display: none;
}

.profile-dropdown.active {
  display: block;
}

.profile-dropdown-header {
  padding: 16px;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.profile-dropdown-header .user-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text);
}

.profile-dropdown-header .user-email {
  font-size: 0.8rem;
  color: var(--color-text-light);
  margin-top: 2px;
}

.profile-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  font-size: 0.875rem;
  color: var(--color-text);
  transition: background var(--transition);
  text-align: left;
}

.profile-dropdown-item:hover {
  background: var(--color-bg);
}

.profile-dropdown-item.danger {
  color: var(--color-danger);
}

.profile-stats {
  padding: 12px 16px;
  border-top: 1px solid var(--color-border);
  font-size: 0.8rem;
  color: var(--color-text-light);
}

.profile-stats span {
  font-weight: 600;
  color: var(--color-primary);
}

/* ---------- Tagline Bar ---------- */
.tagline-bar {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  padding: 10px 16px;
  text-align: center;
  flex-shrink: 0;
}

.tagline-text {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--color-white);
  line-height: 1.35;
  margin: 0;
  letter-spacing: 0.01em;
}

@media (min-width: 768px) {
  .tagline-bar {
    padding: 12px 24px;
  }

  .tagline-text {
    font-size: 0.92rem;
  }
}

/* ---------- Map Container ---------- */
.map-container {
  flex: 1;
  position: relative;
  overflow: hidden;
}

#map {
  width: 100%;
  height: 100%;
}

/* ---------- Map Controls ---------- */
.map-controls {
  position: absolute;
  bottom: 24px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 50;
}

.map-control-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--color-white);
  box-shadow: var(--shadow-md);
  color: var(--color-text);
  font-size: 1.1rem;
  transition: all var(--transition);
}

.map-control-btn:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.map-control-btn.active {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn-near-me {
  width: auto;
  padding: 0 16px;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-full);
}

.btn-near-me span {
  display: none;
}

/* ---------- Mobile Search Bar ---------- */
.mobile-search-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 10px 12px;
  background: var(--color-secondary);
  z-index: 150;
  display: none;
}

.mobile-search-overlay.active {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-search-overlay input {
  flex: 1;
  height: 40px;
  padding: 0 16px;
  border: none;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.15);
  color: var(--color-white);
  font-size: 0.9rem;
  outline: none;
}

.mobile-search-overlay input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.mobile-search-overlay .btn-close-search {
  color: var(--color-white);
  font-size: 1.2rem;
  padding: 8px;
}

/* ---------- Bottom Navigation ---------- */
.bottom-nav {
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: var(--nav-height);
  background: var(--color-white);
  border-top: 1px solid var(--color-border);
  z-index: 100;
  flex-shrink: 0;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  font-size: 0.65rem;
  font-weight: 500;
  transition: all var(--transition);
  min-width: 56px;
}

.nav-item .nav-icon {
  font-size: 1.3rem;
  line-height: 1;
}

.nav-item.active {
  color: var(--color-primary);
}

.nav-item:hover {
  color: var(--color-primary);
}

.nav-item.nav-add {
  position: relative;
}

.nav-item.nav-add .nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--color-cta);
  color: var(--color-white);
  font-size: 1.3rem;
  margin-top: -16px;
  box-shadow: 0 2px 10px rgba(255, 107, 53, 0.4);
  transition: all var(--transition);
}

.nav-item.nav-add:hover .nav-icon {
  transform: scale(1.08);
  box-shadow: 0 4px 14px rgba(255, 107, 53, 0.5);
}

.nav-item.nav-add .nav-label {
  color: var(--color-cta);
  font-weight: 600;
}

/* ---------- Info Window (Map Popup) ---------- */
.gm-style-iw-d {
  overflow: hidden !important;
  padding: 0 !important;
}

.gm-style-iw {
  padding: 0 !important;
}

.info-window {
  padding: 12px;
  min-width: 220px;
  max-width: 280px;
  font-family: var(--font-family);
}

.info-window-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 4px;
  line-height: 1.3;
}

.info-window-address {
  font-size: 0.75rem;
  color: var(--color-text-light);
  margin-bottom: 8px;
}

.info-window-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.info-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
}

.info-badge.verified {
  background: rgba(39, 174, 96, 0.1);
  color: var(--color-success);
}

.info-badge.unverified {
  background: rgba(243, 156, 18, 0.1);
  color: var(--color-warning);
}

.info-badge.type {
  background: rgba(13, 115, 119, 0.1);
  color: var(--color-primary);
  text-transform: capitalize;
}

.info-window-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 10px;
}

.info-window-rating .stars {
  color: var(--color-cta);
  font-size: 0.85rem;
}

.info-window-rating .rating-value {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text);
}

.info-window-actions {
  display: flex;
  gap: 6px;
}

.info-btn {
  flex: 1;
  height: 32px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  transition: all var(--transition);
}

.info-btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
}

.info-btn-primary:hover {
  background: var(--color-primary-dark);
}

.info-btn-secondary {
  background: var(--color-bg);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.info-btn-secondary:hover {
  background: var(--color-border);
}

/* ---------- Modal Overlay ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 500;
  display: none;
  align-items: flex-end;
  justify-content: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--color-white);
  width: 100%;
  max-height: 90vh;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-handle {
  display: flex;
  justify-content: center;
  padding: 12px 0 8px;
}

.modal-handle span {
  width: 40px;
  height: 4px;
  background: var(--color-border);
  border-radius: var(--radius-full);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 16px;
  border-bottom: 1px solid var(--color-border);
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text);
}

.modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  color: var(--color-text-light);
  transition: all var(--transition);
}

.modal-close:hover {
  background: var(--color-bg);
  color: var(--color-text);
}

.modal-body {
  padding: 20px;
}

/* ---------- Report Form ---------- */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 6px;
}

.form-label .required {
  color: var(--color-danger);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--color-text);
  background: var(--color-white);
  outline: none;
  transition: border-color var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--color-primary);
}

.form-textarea {
  height: 80px;
  padding: 12px 14px;
  resize: vertical;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7c93' d='M6 8.825L1.175 4 2.238 2.938 6 6.7l3.763-3.763L10.825 4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 4px;
}

/* Star Rating Input */
.star-rating-input {
  display: flex;
  gap: 4px;
}

.star-rating-input .star {
  font-size: 1.6rem;
  color: var(--color-border);
  cursor: pointer;
  transition: color var(--transition), transform var(--transition);
  user-select: none;
}

.star-rating-input .star:hover,
.star-rating-input .star.active {
  color: var(--color-cta);
}

.star-rating-input .star:hover {
  transform: scale(1.15);
}

/* Photo Upload */
.photo-upload {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 80px;
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  font-size: 0.85rem;
  transition: all var(--transition);
  cursor: pointer;
}

.photo-upload:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(13, 115, 119, 0.03);
}

.btn-submit {
  width: 100%;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--color-cta);
  color: var(--color-white);
  font-size: 1rem;
  font-weight: 700;
  transition: all var(--transition);
  margin-top: 8px;
}

.btn-submit:hover {
  background: var(--color-cta-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.btn-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ---------- Location Detail Panel ---------- */
.detail-panel .modal {
  max-height: 92vh;
}

.detail-hero {
  position: relative;
  padding: 20px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: var(--color-white);
}

.detail-hero-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.2);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.detail-hero-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.detail-name {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 4px;
  padding-right: 40px;
}

.detail-address {
  font-size: 0.85rem;
  opacity: 0.85;
  margin-bottom: 12px;
}

.detail-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.detail-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.2);
}

.detail-content {
  padding: 20px;
}

.detail-section {
  margin-bottom: 20px;
}

.detail-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}

/* Rating Display */
.detail-rating {
  display: flex;
  align-items: center;
  gap: 10px;
}

.detail-rating-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-text);
  line-height: 1;
}

.detail-rating-stars {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.detail-rating-stars .stars {
  color: var(--color-cta);
  font-size: 1rem;
}

.detail-rating-label {
  font-size: 0.75rem;
  color: var(--color-text-light);
}

/* Tips */
.detail-tips {
  padding: 12px 16px;
  background: var(--color-cta-light);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--color-cta);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--color-text);
}

/* Validation Buttons */
.detail-validation {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.btn-confirm,
.btn-deny {
  flex: 1;
  height: 44px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all var(--transition);
}

.btn-confirm {
  background: rgba(39, 174, 96, 0.1);
  color: var(--color-success);
  border: 1.5px solid rgba(39, 174, 96, 0.3);
}

.btn-confirm:hover {
  background: var(--color-success);
  color: var(--color-white);
  border-color: var(--color-success);
}

.btn-deny {
  background: rgba(231, 76, 60, 0.1);
  color: var(--color-danger);
  border: 1.5px solid rgba(231, 76, 60, 0.3);
}

.btn-deny:hover {
  background: var(--color-danger);
  color: var(--color-white);
  border-color: var(--color-danger);
}

/* Verification counts */
.validation-counts {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  font-size: 0.8rem;
  color: var(--color-text-light);
}

.validation-counts .count {
  font-weight: 600;
}

.validation-counts .confirms .count {
  color: var(--color-success);
}

.validation-counts .denies .count {
  color: var(--color-danger);
}

/* Comments */
.comment-card {
  padding: 12px;
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.comment-user {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text);
}

.comment-date {
  font-size: 0.7rem;
  color: var(--color-text-muted);
}

.comment-text {
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--color-text-light);
}

.comment-rating {
  color: var(--color-cta);
  font-size: 0.75rem;
  margin-top: 4px;
}

.no-comments {
  text-align: center;
  padding: 20px;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

/* Detail Actions */
.detail-actions {
  display: flex;
  gap: 8px;
  padding: 16px 20px;
  border-top: 1px solid var(--color-border);
}

.btn-directions {
  flex: 1;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--color-primary);
  color: var(--color-white);
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all var(--transition);
}

.btn-directions:hover {
  background: var(--color-primary-dark);
}

.btn-share {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  border: 1px solid var(--color-border);
}

.btn-share:hover {
  background: var(--color-border);
}

/* Last Verified */
.last-verified {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-align: center;
  padding: 10px 20px 20px;
}

.last-verified strong {
  color: var(--color-success);
}

/* ---------- List View ---------- */
.list-view {
  position: absolute;
  inset: 0;
  background: var(--color-bg);
  z-index: 80;
  overflow-y: auto;
  display: none;
  padding: 12px;
}

.list-view.active {
  display: block;
}

.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 4px;
}

.list-header h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text);
}

.list-count {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.list-sort {
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  color: var(--color-text);
  background: var(--color-white);
}

.location-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  cursor: pointer;
  border: 1.5px solid transparent;
}

.location-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}

.location-card:active {
  transform: scale(0.99);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}

.card-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
  flex: 1;
  padding-right: 10px;
}

.card-distance {
  font-size: 0.75rem;
  color: var(--color-primary);
  font-weight: 600;
  white-space: nowrap;
  background: rgba(13, 115, 119, 0.08);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.card-address {
  font-size: 0.78rem;
  color: var(--color-text-light);
  margin-bottom: 8px;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.card-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  font-weight: 600;
}

.card-badge.verified {
  background: rgba(39, 174, 96, 0.1);
  color: var(--color-success);
}

.card-badge.unverified {
  background: rgba(243, 156, 18, 0.1);
  color: var(--color-warning);
}

.card-badge.type {
  background: rgba(13, 115, 119, 0.08);
  color: var(--color-primary);
  text-transform: capitalize;
}

.card-rating {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.78rem;
}

.card-rating .stars {
  color: var(--color-cta);
}

.card-rating .value {
  font-weight: 600;
  color: var(--color-text);
}

/* ---------- About Modal ---------- */
.about-content {
  text-align: center;
  padding: 10px 0 20px;
}

.about-logo {
  font-size: 3rem;
  margin-bottom: 12px;
}

.about-name {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--color-secondary);
  margin-bottom: 4px;
}

.about-tagline {
  font-size: 0.9rem;
  color: var(--color-text-light);
  margin-bottom: 20px;
}

.about-description {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--color-text);
  text-align: left;
  margin-bottom: 20px;
}

.about-features {
  text-align: left;
  margin-bottom: 20px;
}

.about-feature {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border-light);
}

.about-feature:last-child {
  border-bottom: none;
}

.about-feature-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  width: 32px;
  text-align: center;
}

.about-feature-text {
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--color-text-light);
}

.about-feature-text strong {
  color: var(--color-text);
  display: block;
  margin-bottom: 2px;
}

.about-footer {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

/* ---------- Toast Notifications ---------- */
.toast-container {
  position: fixed;
  top: calc(var(--header-height) + 12px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 600;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  background: var(--color-secondary);
  color: var(--color-white);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease;
  pointer-events: auto;
  white-space: nowrap;
}

.toast.success {
  background: var(--color-success);
}

.toast.error {
  background: var(--color-danger);
}

.toast.fadeout {
  animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-10px); }
}

/* ---------- Loading Spinner ---------- */
.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
  display: none;
}

.loading-overlay.active {
  display: flex;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ---------- Empty State ---------- */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--color-text-muted);
}

.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.empty-state-text {
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.empty-state .btn-submit {
  width: auto;
  display: inline-flex;
  padding: 0 24px;
}

/* ---------- Legend ---------- */
.map-legend {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--color-white);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  box-shadow: var(--shadow-md);
  z-index: 50;
  font-size: 0.72rem;
  display: none;
}

.map-legend.active {
  display: block;
}

.legend-title {
  font-weight: 700;
  font-size: 0.75rem;
  margin-bottom: 6px;
  color: var(--color-text);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
  color: var(--color-text-light);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-dot.green { background: #27ae60; }
.legend-dot.yellow { background: #f39c12; }
.legend-dot.blue { background: #3498db; }

/* ---------- Tablet & Desktop (min 768px) ---------- */
@media (min-width: 768px) {
  :root {
    --header-height: 64px;
  }

  .header-brand .brand-text-short {
    display: none;
  }

  .header-brand .brand-text-full {
    display: inline;
  }

  .header-search {
    display: block;
  }

  .btn-search-mobile {
    display: none;
  }

  .bottom-nav {
    height: 56px;
  }

  .nav-item {
    flex-direction: row;
    gap: 6px;
    font-size: 0.8rem;
    padding: 8px 18px;
    border-radius: var(--radius-full);
  }

  .nav-item.active {
    background: rgba(13, 115, 119, 0.08);
  }

  .nav-item .nav-icon {
    font-size: 1.1rem;
  }

  .nav-item.nav-add .nav-icon {
    width: 32px;
    height: 32px;
    margin-top: 0;
    font-size: 1.1rem;
  }

  .modal {
    max-width: 520px;
    border-radius: var(--radius-xl);
    margin-bottom: 20px;
  }

  .list-view {
    padding: 16px 24px;
  }

  .location-card {
    padding: 16px 20px;
  }

  .map-legend {
    display: block;
  }

  .btn-near-me span {
    display: inline;
  }

  .map-controls {
    bottom: 24px;
    right: 20px;
  }
}

/* ---------- Desktop (min 1024px) ---------- */
@media (min-width: 1024px) {
  .app-header {
    padding: 0 24px;
  }

  .header-search {
    max-width: 500px;
  }

  .modal {
    max-width: 560px;
  }

  .list-view {
    padding: 20px 40px;
  }

  .location-card {
    display: flex;
    align-items: center;
    gap: 16px;
  }

  .card-top {
    flex: 1;
    margin-bottom: 0;
  }

  .card-address {
    margin-bottom: 0;
  }

  .card-meta {
    flex-shrink: 0;
  }
}

/* ---------- Large Desktop (min 1280px) ---------- */
@media (min-width: 1280px) {
  .list-view {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 0;
  }
}

/* ============================================================
   Ads & Affiliate Styles
   ============================================================ */

/* "Sponsored" micro-label above ad units */
.ad-label {
  font-size: 0.65rem;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
  margin-bottom: 2px;
}

/* Sticky banner ad above bottom nav */
.map-ad-banner {
  position: fixed;
  bottom: 64px; /* sits above the 64px bottom-nav */
  left: 0;
  right: 0;
  z-index: 90;
  background: #f8f9fa;
  border-top: 1px solid #e8eaed;
  padding: 4px 8px 2px;
  text-align: center;
      min-height: 0; /* collapse when empty */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.map-ad-banner:empty { display: none !importantimportant; }
.map-ad-banner .ad-label:only-child { display: none; display@media (max-width: 768px) { .map-ad-banner { max-height: 60px; overflow: hidden; } }

/* Push list-view content up so it clears the sticky ad */
.list-view {
  padding-bottom: 120px;
}

/* Ad card between list items */
.list-ad-slot {
  margin: 4px 0;
  background: #f8f9fa;
  border-radius: 10px;
  border: 1px solid #e8eaed;
  padding: 6px 8px 4px;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Ad inside detail panel */
.detail-ad-slot {
  margin: 8px 16px 4px;
  background: #f8f9fa;
  border-radius: 10px;
  border: 1px solid #e8eaed;
  padding: 6px 8px 4px;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ---- Affiliate "Dad Essentials" section ---- */
.affiliate-section {
  border-top: 1px solid #e8eaed;
}

.affiliate-note {
  font-size: 0.8rem;
  color: #666;
  margin: 0 0 10px;
}

.affiliate-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.affiliate-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 8px;
  background: #fff;
  border: 1px solid #e8eaed;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.affiliate-card:hover,
.affiliate-card:focus {
  border-color: #14274e;
  box-shadow: 0 2px 8px rgba(20,39,78,0.10);
  outline: none;
}

.affiliate-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.affiliate-name {
  font-size: 0.72rem;
  font-weight: 600;
  color: #222;
  text-align: center;
  line-height: 1.2;
}

.affiliate-cta {
  font-size: 0.65rem;
  color: #e47911; /* Amazon orange */
  font-weight: 500;
}

.affiliate-disclaimer {
  font-size: 0.62rem;
  color: #aaa;
  text-align: center;
  margin: 4px 0 0;
  font-style: italic;
}
