* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Modern color palette - inspired by Notion/Airbnb */
  --primary: #111111;
  --primary-light: #484848;
  --accent: #ff385c;
  --accent-hover: #e31c5f;
  --success: #00a699;
  --warning: #ffb400;
  --text-primary: #222222;
  --text-secondary: #717171;
  --text-tertiary: #b0b0b0;
  --bg-primary: #ffffff;
  --bg-secondary: #f7f7f7;
  --bg-tertiary: #ebebeb;
  --border-light: #ebebeb;
  --border-medium: #dddddd;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 28px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

/* Dark mode color palette */
body.dark-mode {
  --primary: #ffffff;
  --primary-light: #e0e0e0;
  --accent: #ff385c;
  --accent-hover: #ff5a7a;
  --text-primary: #ebebeb;
  --text-secondary: #b0b0b0;
  --text-tertiary: #717171;
  --bg-primary: #191919;
  --bg-secondary: #111111;
  --bg-tertiary: #2a2a2a;
  --border-light: #2a2a2a;
  --border-medium: #333333;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 28px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-secondary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  display: flex;
  height: 100vh;
}

/* Sidebar Styles */
.sidebar {
  width: 420px;
  background-color: var(--bg-primary);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-md);
  z-index: 10;
  overflow: hidden;
}

.header {
  padding: 2rem 2rem 1.75rem 2rem;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-light);
}

.logo {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--accent);
  margin: 0;
}

.header .subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-left: 0;
}

/* Filters Toggle Button */
.filters-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  background-color: var(--bg-primary);
  border: none;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.filters-toggle:hover {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

.filters-toggle .chevron-icon {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--text-secondary);
}

.filters-toggle:hover .chevron-icon {
  color: var(--text-primary);
}

.filters-toggle.collapsed .chevron-icon {
  transform: rotate(-90deg);
}

/* Filters */
.filters {
  padding: 1.25rem 2rem 1.5rem 2rem;
  border-bottom: 1px solid var(--border-light);
  background-color: var(--bg-primary);
  max-height: 500px;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filters.collapsed {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.search-box {
  margin-bottom: 1rem;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  color: var(--text-primary);
  transition: all 0.2s ease;
  background-color: var(--bg-primary);
}

.search-box input::placeholder {
  color: var(--text-tertiary);
}

.search-box input:hover {
  border-color: var(--primary);
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.05);
}

.filter-group {
  margin-bottom: 1rem;
}

.filter-group:last-child {
  margin-bottom: 0;
}

.filter-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-primary);
  letter-spacing: 0.2px;
}

.filter-group select {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 500;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='14' height='9' viewBox='0 0 14 9' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L7 7.5L13 1.5' stroke='%23717171' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 3rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.filter-group select:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.filter-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.05), 0 2px 4px rgba(0, 0, 0, 0.06);
}

/* Style select options */
.filter-group select option {
  padding: 0.75rem 1rem;
  font-weight: 500;
}

/* Dark mode select dropdown arrow */
body.dark-mode .filter-group select {
  background-image: url("data:image/svg+xml,%3Csvg width='14' height='9' viewBox='0 0 14 9' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L7 7.5L13 1.5' stroke='%23b0b0b0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

body.dark-mode .filter-group select:hover {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

body.dark-mode .filter-group select:focus {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05), 0 2px 4px rgba(0, 0, 0, 0.3);
}

.checkbox-group label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9375rem;
  padding: 0.5rem 0;
  user-select: none;
}

.checkbox-group input[type="checkbox"] {
  position: relative;
  margin-right: 0.75rem;
  width: 20px;
  height: 20px;
  cursor: pointer;
  appearance: none;
  border: 2px solid var(--border-medium);
  border-radius: 6px;
  background-color: var(--bg-primary);
  transition: all 0.2s ease;
}

.checkbox-group input[type="checkbox"]:hover {
  border-color: var(--primary);
}

.checkbox-group input[type="checkbox"]:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

.checkbox-group input[type="checkbox"]:checked::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 12px;
  font-weight: 700;
}

/* Restaurant List */
.restaurant-list {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1.5rem;
  background-color: var(--bg-secondary);
}

.restaurant-card {
  background-color: var(--bg-primary);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.restaurant-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 0 1px rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
}

.restaurant-card.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(17, 17, 17, 0.08);
}

.restaurant-card.banned {
  background-color: rgba(255, 56, 92, 0.02);
  border-color: rgba(255, 56, 92, 0.12);
}

.restaurant-image {
  width: 100%;
  height: 160px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.restaurant-content {
  padding: 16px;
}

/* Banned badge for cards */
.card-banned-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background-color: rgba(255, 56, 92, 0.08);
  color: var(--accent);
  font-size: 0.6875rem;
  font-weight: 600;
  border-radius: 6px;
  margin-bottom: 8px;
  letter-spacing: 0.2px;
}

.restaurant-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.3px;
  line-height: 1.3;
}

/* Card meta row - cuisine and rating */
.card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 0.8125rem;
}

.card-cuisine {
  color: var(--text-secondary);
  font-weight: 500;
}

.card-separator {
  color: var(--text-tertiary);
  font-weight: 400;
}

.card-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-primary);
  font-weight: 600;
}

.card-rating svg {
  color: #222;
  margin-top: -1px;
}

.restaurant-address {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.4;
  font-weight: 400;
}

/* Map Container */
.map-container {
  flex: 1;
  position: relative;
  background-color: var(--bg-secondary);
}

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

/* Google Maps Info Window Styling Override */
.gm-style .gm-style-iw-c {
  border-radius: var(--radius-lg) !important;
  padding: 0 !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 0 0 1px rgba(0, 0, 0, 0.04) !important;
  max-width: 360px !important;
  overflow: hidden !important;
  border: 1px solid rgba(0, 0, 0, 0.04) !important;
}

.gm-style .gm-style-iw-d {
  overflow: hidden !important;
  max-height: none !important;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 0 !important;
}

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

.gm-style .gm-style-iw-t::after {
  display: none !important;
}

/* Remove the Google Maps header container that creates the white gap */
.gm-style .gm-style-iw-ch {
  display: none !important;
  padding: 0 !important;
  margin: 0 !important;
  height: 0 !important;
}

/* Hide the default close button completely */
.gm-style-iw button.gm-ui-hover-effect {
  display: none !important;
}

/* Info Window Custom Styles - Minimal, Notion/Airbnb-inspired Design */
.info-window {
  width: 360px;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  line-height: 0;
}

.info-window > * {
  line-height: normal;
}

/* Custom close button - Airbnb style */
.info-window-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
}

.info-window-close:hover {
  background: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
  transform: scale(1.06);
}

.info-window-close:active {
  transform: scale(0.98);
}

.info-window-close svg {
  width: 14px;
  height: 14px;
  stroke: #222;
  stroke-width: 2.5;
}

.info-window-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
}

.info-window-content {
  padding: 20px;
  flex: 1;
}

/* Banned badge - subtle, top of content */
.info-banned-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background-color: rgba(255, 56, 92, 0.08);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 6px;
  margin-bottom: 12px;
  letter-spacing: 0.2px;
}

.info-window h3 {
  margin: 0 0 8px 0;
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.4px;
  line-height: 1.3;
}

/* Meta row - cuisine, rating in one line */
.info-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 0.875rem;
}

.info-cuisine {
  color: var(--text-secondary);
  font-weight: 500;
}

.info-separator {
  color: var(--text-tertiary);
  font-weight: 400;
}

.info-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-primary);
  font-weight: 600;
}

.info-rating svg {
  color: #222;
  margin-top: -1px;
}

.info-description {
  font-size: 0.9375rem;
  margin: 0 0 20px 0;
  line-height: 1.5;
  color: var(--text-secondary);
}

/* Details section - clean list */
.info-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.info-detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-detail-label {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-detail-value {
  font-size: 0.875rem;
  color: var(--text-primary);
  font-weight: 500;
  line-height: 1.4;
}

/* Scrollbar Styles */
.restaurant-list::-webkit-scrollbar {
  width: 6px;
}

.restaurant-list::-webkit-scrollbar-track {
  background: transparent;
}

.restaurant-list::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: 100px;
}

.restaurant-list::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: 50vh;
  }

  .map-container {
    height: 50vh;
  }

  .header {
    padding: 1.5rem 1.25rem 1.25rem 1.25rem;
  }

  .header h1 {
    font-size: 1.5rem;
  }

  .filters {
    padding: 1.25rem;
  }

  .restaurant-list {
    padding: 1rem;
  }
}

/* Loading State */
.loading-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-secondary);
}

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

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

.loading-state p {
  font-size: 0.9375rem;
  font-weight: 500;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-secondary);
}

.empty-state p {
  font-size: 0.9375rem;
  line-height: 1.6;
  font-weight: 500;
}

/* Loading Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.restaurant-card {
  animation: fadeIn 0.3s ease forwards;
}

/* Smooth transitions */
* {
  transition-property: background-color, border-color, color, fill, stroke;
  transition-duration: 150ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

button,
input,
select,
textarea {
  transition-property: background-color, border-color, color, fill, stroke,
    box-shadow;
}

/* Dark Mode Toggle Button */
.dark-mode-toggle {
  position: relative;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-medium);
  border-radius: 50%;
  background-color: var(--bg-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  margin-left: auto;
  padding: 0;
}

.dark-mode-toggle:hover {
  background-color: var(--bg-tertiary);
  border-color: var(--primary);
  transform: scale(1.05);
}

.dark-mode-toggle:active {
  transform: scale(0.95);
}

.dark-mode-toggle .sun-icon,
.dark-mode-toggle .moon-icon {
  position: absolute;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--text-primary);
}

.dark-mode-toggle .sun-icon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.dark-mode-toggle .moon-icon {
  opacity: 0;
  transform: rotate(180deg) scale(0);
}

body.dark-mode .dark-mode-toggle .sun-icon {
  opacity: 0;
  transform: rotate(-180deg) scale(0);
}

body.dark-mode .dark-mode-toggle .moon-icon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.logo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  width: 100%;
}

/* Dark mode specific overrides */
body.dark-mode .info-window {
  background: var(--bg-primary);
}

body.dark-mode .info-window h3 {
  color: var(--text-primary);
}

body.dark-mode .info-window-close {
  background: rgba(25, 25, 25, 0.96);
}

body.dark-mode .info-window-close:hover {
  background: var(--bg-primary);
}

body.dark-mode .info-window-close svg {
  stroke: var(--text-primary);
}

body.dark-mode .card-rating svg,
body.dark-mode .info-rating svg {
  color: var(--text-primary);
}

body.dark-mode .restaurant-card {
  border-color: var(--border-medium);
}

body.dark-mode .restaurant-card:hover {
  border-color: var(--primary-light);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 1px rgba(255, 255, 255, 0.1);
}

body.dark-mode .restaurant-card.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

body.dark-mode .info-details {
  border-top-color: var(--border-medium);
}

body.dark-mode .gm-style .gm-style-iw-c {
  background-color: var(--bg-primary) !important;
  border-color: var(--border-medium) !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.6), 0 0 1px rgba(255, 255, 255, 0.1) !important;
}

body.dark-mode .checkbox-group input[type="checkbox"]:checked::after {
  color: var(--bg-primary);
}
