@tailwind base;
@tailwind components;
@tailwind utilities;

/* CSS Custom Properties for Theme */
:root {
  --bg: hsl(210, 20%, 98%);
  --text: hsl(222, 47%, 11%);
  --surface: hsl(0, 0%, 100%);
  --surface-2: hsl(210, 16%, 96%);
  --border: hsl(214, 32%, 91%);
  --muted: hsl(215, 16%, 45%);
  --primary: hsl(217, 91%, 60%); /* #4285f4 blue */
  --primary-hover: hsl(217, 91%, 54%); /* #3367d6 darker blue */
  --primary-contrast: hsl(0, 0%, 100%);
  --header-bg: hsl(215, 25%, 27%); /* slate-700 */
  --header-border: hsl(215, 20%, 35%); /* slate-600 */
  --accent-bg: hsl(220, 100%, 97%); /* #eff6ff */
  --accent-border: hsl(214, 100%, 87%); /* #bfdbfe */
  --accent-hover: hsl(214, 100%, 92%); /* #dbeafe */
  --accent-primary: hsl(217, 91%, 60%); /* #2563eb */
  --disabled-bg: hsl(210, 14%, 95%);
  --disabled-text: hsl(210, 11%, 71%);
}


/* Base */
* { box-sizing: border-box; }
html {
  height: 100%;
  overflow-y: scroll; /* Always show scrollbar space to prevent layout shift */
}
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg) !important;
  color: var(--text);
  font-family: 'Roboto Condensed', Arial Narrow, sans-serif;
  font-size: 17px;
  line-height: 1.4;
}
#root {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Main app container - grows to push footer down */
#app {
  flex: 1 0 auto;
}

/* Sticky header */
.hdr{
  position: sticky; top: 0; z-index: 1000;
  flex-shrink: 0; /* Don't shrink in flex container */
  display: grid; grid-template-columns: 60px 1fr 72px;
  align-items: center;
  height: 56px;
  padding: 0 12px;
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  border-bottom: 1px solid var(--header-border);
  color: white;
}
.icon-btn{
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px; line-height: 1;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text);
  margin: 10px 12px 10px 0px;
}
.logo{
  text-align: center;
  font-weight: 800;
  letter-spacing: .2px;
  user-select: none;
  color: inherit;
  text-decoration: none;
}
.langs{ display: flex; gap: 8px; justify-content: flex-end; }
.lang{
  width: 30px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 22px; line-height: 1;
  background: transparent; border: 1px solid transparent; border-radius: 3px;
  padding: 0px;
  opacity: 0.7;
}
.lang[aria-pressed="true"],
.lang.active,
.lang[aria-pressed="true"].active{
  background: hsl(134, 61%, 48%) !important;
  box-shadow: none !important;
  border: 1px solid hsl(134, 61%, 48%) !important;
  opacity: 1 !important;
}

/* Notification indicators */
.notification-indicator {
  background: #dc3545;
  color: white;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  font-size: 11px;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: -2px;
  right: -2px;
  border: 2px solid white;
  animation: pulse 2s infinite;
}

#btn-options {
  position: relative;
}

#btn-options .notification-indicator {
  top: 2px;
  right: 2px;
}

#messages-notification {
  position: relative;
  top: -1px;
  right: auto;
  margin-left: 8px;
  border: 1px solid #dc3545;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(220, 53, 69, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}
.lang:hover:not(:disabled):not([aria-pressed="true"]):not(.active){
  background: rgba(0,0,0,.05);
  cursor: pointer;
}
.lang:disabled{
  opacity: 0.6;
  cursor: not-allowed;
}

/* Account menu */
.acct-menu{
  position: fixed; top: 56px; left: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  padding: 6px; width: 200px;
  display: none; z-index: 1100;
}
.acct-menu.open{ display: block; }
.acct-menu a, .acct-menu .menu-item{
  display: block; padding: 10px 12px; border-radius: 8px;
  color: inherit; text-decoration: none; font-size: 15px;
  background: none; border: none; width: 100%; text-align: left;
  font: inherit; cursor: pointer;
}
.acct-menu a:hover, .acct-menu .menu-item:hover{ background: var(--surface-2); }

/* User info styling */
.acct-menu .user-info{
  padding: 12px 12px 8px; 
  border-bottom: 1px solid var(--border);
  margin-bottom: 2px;
  cursor: default;
}
.acct-menu .user-info:hover{ background: none; }
.user-name{
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  margin-bottom: 2px;
}
.user-email{
  font-size: 13px;
  color: var(--muted);
}

/* Sign in form styles */
.auth-form {
  max-width: 380px;
  margin: 1rem auto;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
}

/* Auth tabs */
.auth-tabs {
  display: flex;
  margin-bottom: 1.25rem;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.auth-tab {
  flex: 1;
  padding: 10px 20px;
  background: var(--surface);
  border: none;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text);
}

.auth-tab.active {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: white;
}

.auth-tab:not(.active):hover {
  background: var(--surface-2);
}

/* Form fields */
.signin-form .field {
  margin-bottom: 1rem;
}

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

.signin-form input[type="email"],
.signin-form input[type="password"],
.signin-form input[type="text"],
.signin-form input[type="number"],
.signin-form select,
.signin-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 15px;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.signin-form textarea {
  resize: none;
  min-height: 100px;
}

.signin-form select:focus,
.signin-form textarea:focus,
.signin-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.1);
}

/* Field hint text */
.field-hint {
  font-size: 13px;
  color: var(--muted);
  margin: 4px 0 8px 0;
}

/* Photo action buttons */
.photo-action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.photo-action-btn {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.photo-action-btn:hover {
  background: var(--surface-2);
  border-color: var(--primary);
}

/* Form buttons container */
.form-buttons {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

/* Danger button styling */
.btn-danger {
  width: 100%;
  padding: 12px 20px;
  background: linear-gradient(135deg, #dc3545 0%, #a71e2a 100%) !important;
  color: white !important;
  border: none !important;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-danger:hover {
  background: linear-gradient(135deg, #c82333 0%, #921923 100%) !important;
  transform: translateY(-1px);
}

/* Specific styling for delete listing button to ensure it's red */
#delete-listing-btn {
  background: linear-gradient(135deg, #dc3545 0%, #a71e2a 100%) !important;
  color: white !important;
  border: none !important;
}

/* Custom Dropdown Styling */
.custom-dropdown {
  position: relative;
  width: 100%;
}

.dropdown-trigger {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 15px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
  font-family: inherit;
}

.dropdown-trigger:hover {
  border-color: var(--primary);
}

.dropdown-trigger.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.1);
}

.dropdown-trigger .placeholder {
  color: var(--muted);
}

.dropdown-arrow {
  font-size: 12px;
  transition: transform 0.2s ease;
  color: var(--muted);
}

.dropdown-trigger.active .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  z-index: 1000;
  max-height: 300px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
}

.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-search {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--surface);
}

.dropdown-search input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 14px;
  background: var(--surface);
  color: var(--text);
}

.dropdown-search input:focus {
  outline: none;
  border-color: var(--primary);
}

.dropdown-option {
  padding: 12px 14px;
  cursor: pointer;
  transition: background-color 0.1s ease;
  font-size: 15px;
  color: var(--text);
}

.dropdown-option:hover {
  background: var(--surface-2);
}

.dropdown-option.selected {
  background: var(--primary);
  color: white;
}

.dropdown-option.no-results {
  color: var(--muted);
  cursor: default;
  font-style: italic;
}

.dropdown-option.no-results:hover {
  background: transparent;
}

.signin-form input::placeholder {
  color: var(--muted);
}

/* Sign in button */
.signin-btn {
  width: 100%;
  padding: 12px 20px;
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
  color: white !important;
  border: none !important;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 1rem;
  box-shadow: none !important;
  outline: none !important;
  opacity: 1 !important;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.signin-btn:disabled {
  background: #6c757d !important;
  cursor: not-allowed !important;
  opacity: 0.6 !important;
}

.signin-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
  box-shadow: none !important;
}

.signin-btn:focus:not(:disabled) {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
  box-shadow: none !important;
  outline: none !important;
}

.signin-btn:active:not(:disabled) {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
  box-shadow: none !important;
}

/* Auth divider */
.auth-divider {
  text-align: center;
  margin: 1rem 0;
  position: relative;
}

.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
}

.auth-divider span {
  background: var(--surface);
  padding: 0 0.75rem;
  color: var(--muted);
  font-size: 13px;
}

/* Social sign in buttons */
.social-signin {
  margin-bottom: 1rem;
}

.social-btn {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  transition: all 0.2s ease;
}

.social-btn:hover {
  background: var(--surface-2);
  border-color: var(--muted);
}

.social-btn i {
  font-size: 16px;
  width: 16px;
  text-align: center;
}

.google-btn i {
  color: #4285f4;
}

.facebook-btn i {
  color: #1877f2;
}

/* Auth links */
.auth-links {
  text-align: center;
}

.auth-links p {
  margin: 0.5rem 0;
}

.forgot-link {
  color: var(--primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.forgot-link:hover {
  text-decoration: underline;
}

.back-link {
  color: var(--primary);
  text-decoration: none;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}

.back-link:hover {
  text-decoration: underline;
}

/* Search */
.search{
  position: sticky; top: 56px; z-index: 999;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; background: linear-gradient(135deg, #007bff 0%, #0056b3 100%); border-bottom: 1px solid var(--header-border);
  color: white;
}
.search input{
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  font: inherit;
  flex: 1; min-width: 100px;
  color: var(--text);
  outline: none;
}
.search input:focus{
  border-color: var(--primary);
  box-shadow: 0 0 0 2px hsla(134, 61%, 48%, 0.12);
}
.search input:disabled{
  background: var(--disabled-bg);
  color: var(--disabled-text);
  cursor: not-allowed;
}
.search-btn{
  height: 42px; width: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  font-size: 18px; line-height: 1;
  flex: 0 0 auto;
  color: var(--text);
}

/* City dropdown */
.city-wrap{ position: relative; }
.city-pill{
  height: 42px;
  padding: 0 10px;
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); font: inherit; color: var(--text);
  max-width: 45vw; overflow: hidden; text-overflow: ellipsis;
}
.city-pill .caret{ color: var(--muted); transition: transform .15s ease; }
.city-pill[aria-expanded="true"] .caret{ transform: rotate(180deg); }
.city-panel{
  position: absolute;
  margin-top: 4px; min-width: 180px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  padding: 12px; z-index: 1200;
  max-height: 492px;
  overflow-y: auto;
}
.city-panel[hidden]{ display:none; }
.city-opt{
  display:block; width:100%; text-align:left;
  height: 40px; padding: 0 10px; margin: 4px 0;
  background: var(--surface); border:1px solid var(--border); border-radius:8px;
  font: inherit; color: var(--text); white-space: nowrap;
}
.city-pill span{ white-space: nowrap; }

.page-heading {
  font-size: 1.25rem;
  font-weight: bold;
  margin: 0;
  padding-block: 2px;
  text-align: center;
}

/* Categories (Home) */
.cats{ padding: 10px 12px; }
.cat{ margin: 6px 0; }
.cat-btn{
  width: 100%; height: 44px; padding: 0 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  font: inherit; font-weight: 700; color: var(--text);
  transition: all 0.15s ease;
}
.cat-btn .label{ flex: 1; text-align: left; display:flex; align-items:center; gap:10px; }
.cat-btn .label i{ width:20px; text-align:center; color: var(--muted); }
.cat-btn .caret{ color: var(--muted); transition: transform .15s ease; }
.cat-btn[aria-expanded="true"] .caret{ transform: rotate(180deg); }

/* Enhanced styling for expanded parent category */
.cat-btn[aria-expanded="true"] {
  background: var(--accent-bg);
  border-color: var(--accent-primary);
  box-shadow: 0 2px 6px rgba(37,99,235,.1);
}
.cat-btn[aria-expanded="true"] .label i {
  color: var(--accent-primary);
}
.cat-panel{
  position: static;
  margin-top: 4px;
  background: #ffffff;
  border: 1px solid var(--accent-border);
  border-left: 2px solid var(--accent-primary);
  border-radius: 0 12px 12px 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  padding: 12px;
  max-height: 90vh;
  overflow: auto;
  scrollbar-gutter: stable;
  display: none;
}
.cat-btn[aria-expanded="true"] + .cat-panel{ display:block; }
.cat-panel a{
  display: block; margin: 4px; padding: 8px 16px;
  border: 1px solid var(--accent-border); border-radius: 8px; background: var(--surface);
  text-decoration: none; color: var(--text); font-size: 15px;
  transition: all 0.15s ease;
}
.cat-panel a:hover{ 
  background: var(--accent-hover); 
  border-color: var(--accent-primary);
  transform: translateX(2px);
}

/* Calendar in Category Nav */
#panel-calendar.cat-panel {
  background: transparent !important;
  text-align: center;
}

.calendar-in-nav {
  width: 100%;
  margin: 0;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  overflow: hidden;
}

.calendar-container {
  background: #fff;
  border-radius: 8px;
  padding: 16px;
}

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

.calendar-nav-btn {
  background: transparent;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  color: #374151;
}

.calendar-nav-btn:hover {
  background: #f3f4f6;
}

.calendar-month-year {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #374151;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  margin-bottom: 4px;
}

.weekday {
  padding: 8px 4px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
}

.calendar-today-row {
  margin: 4px 0 8px 0;
  text-align: center;
}

.btn-small {
  padding: 6px 16px !important;
  font-size: 13px !important;
  height: auto !important;
  min-height: 32px !important;
}

.btn-small:disabled {
  background: #f3f4f6 !important;
  color: #9ca3af !important;
  cursor: not-allowed !important;
  opacity: 0.6 !important;
}

.btn-small:disabled:hover {
  background: #f3f4f6 !important;
  color: #9ca3af !important;
}

.details-content {
  text-align: center;
  margin-top: 16px;
}

.no-events {
  display: flex;
  align-items: center;
  justify-content: center;
}

.no-events-text {
  font-size: 14px;
  color: #6b7280;
  font-style: italic;
}

.holiday-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.holiday-badge {
  background: #fecaca;
  color: #7f1d1d;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.holiday-name {
  font-size: 14px;
  color: #374151;
  font-weight: 500;
}

.calendar-in-nav button[class*="day"],
.calendar-in-nav .calendar-day {
  background: white !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 4px !important;
  margin: 0 !important;
  padding: 0 !important;
  font-weight: 500 !important;
  color: #374151 !important;
  width: 100% !important;
  height: 36px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  cursor: pointer !important;
  font-size: 14px !important;
}

.calendar-in-nav .calendar-day.holiday {
  background: #fecaca !important;
  border: 1px solid #fecaca !important;
  color: #374151 !important;
  font-weight: 600 !important;
  border-radius: 4px !important;
}

.calendar-in-nav button[class*="day"]:hover,
.calendar-in-nav .calendar-day:hover {
  background: #f3f4f6 !important;
  border-color: #d1d5db !important;
}

.calendar-in-nav button[class*="day"]:hover.holiday,
.calendar-in-nav .calendar-day:hover.holiday {
  background: #fecaca !important;
  border: 1px solid #fecaca !important;
  color: #374151 !important;
}

.calendar-in-nav button[class*="day"]:hover.selected,
.calendar-in-nav .calendar-day:hover.selected {
  background: #3b82f6 !important;
  color: white !important;
  border-color: #3b82f6 !important;
}

/* Today's date styling - light blue highlight */
.calendar-in-nav .calendar-day.today {
  background: #dbeafe !important;
  color: #1e40af !important;
  border: 1px solid #dbeafe !important;
  border-radius: 4px !important;
}

/* Selected date styling - darker blue highlight */
.calendar-in-nav button[class*="day_selected"],
.calendar-in-nav .calendar-day.selected {
  background: #3b82f6 !important;
  color: white !important;
  border-color: #3b82f6 !important;
  border-radius: 4px !important;
}

/* Today's date when also selected - keep the darker blue */
.calendar-in-nav .calendar-day.today.selected {
  background: #3b82f6 !important;
  color: white !important;
  border-color: #3b82f6 !important;
}

/* Gray out dates from previous/next month */
.calendar-in-nav .calendar-day.outside {
  color: #9ca3af !important;
  opacity: 0.6 !important;
}

.calendar-in-nav .calendar-day.outside:hover {
  background: transparent !important;
  color: #9ca3af !important;
}

/* This rule is now above with the general day styling */

.calendar-in-nav .calendar-day.holiday.selected {
  background: #3b82f6 !important;
  color: white !important;
  border: 1px solid #3b82f6 !important;
  font-weight: 500 !important;
}

/* Submit button (CTA) */
.cta-btn{
  height: 48px;
  padding: 0 18px;
  background: var(--primary); color: var(--primary-contrast);
  border: 1px solid var(--primary); border-radius: 12px;
  font: inherit; font-weight: 700; font-size: 16px;
  text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: all .15s ease;
}
.cta-btn:hover{
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(66,133,244,.3);
}

/* Content area */
.content{
  flex: 1;
  padding: 0;
}

/* Grid and list layouts */
.grid-container{
  padding: 12px;
}
.listings-grid{
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.listings-list{
  display: flex; flex-direction: column;
  gap: 12px; padding: 12px;
}

/* Detail view cards - expanded vertical layout */
.detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  margin-bottom: 16px;
  box-shadow: 0 2px 4px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
}

.detail-card-img {
  width: 100%;
  max-height: 80vh;
  background: #f5f5f5;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-card-img img {
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
  display: block;
}

.detail-card-body {
  padding: 16px;
}

.detail-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.detail-card-title {
  font-weight: 600;
  font-size: 18px;
  color: var(--text);
  margin: 0;
  line-height: 1.3;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-card-price {
  font-weight: 700;
  font-size: 20px;
  color: var(--primary);
  margin: 0;
  white-space: nowrap;
}

.detail-card-desc {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 12px 0;
  line-height: 1.5;
}

.detail-card-posted {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 8px 0;
  font-style: italic;
}

.detail-card-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

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

.detail-card-badge {
  background: var(--accent-bg);
  color: var(--accent-primary);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

.detail-card-footer {
  font-size: 12px;
  color: var(--muted);
  padding-top: 8px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* List view cards - compact horizontal layout */
.list-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 12px;
  display: flex;
  gap: 8px;
  transition: all .15s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.list-card:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  transform: translateY(-1px);
}

.list-card-img {
  position: relative;
  width: 80px;
  height: 80px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: var(--surface-2);
  overflow: hidden;
}

.list-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}


.list-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.list-card-title {
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
  margin: 0;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-card-price {
  font-weight: 700;
  font-size: 18px;
  color: var(--primary);
  margin: 0;
}

.list-card-desc {
  font-size: 14px;
  color: var(--muted);
  margin: 2px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.list-card-meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: auto;
}

/* Status badges for dashboard listing cards */
.list-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}

.status-badge {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 12px;
  flex-shrink: 0;
}

.status-badge-draft {
  background-color: #6b7280;
  color: white;
}

.status-badge-active {
  background-color: #10b981;
  color: white;
}

.status-badge-expired {
  background-color: #ef4444;
  color: white;
}

/* Filter panel */
.filters-panel{
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  margin: 12px; padding: 16px;
}
.filters-title{
  font-weight: 600; margin: 0 0 12px 0;
}
.filter-group{
  margin-bottom: 16px;
}
.filter-label{
  display: block; font-weight: 500; margin-bottom: 6px;
  color: var(--text);
}
.filter-select, .filter-input{
  width: 100%; height: 40px;
  padding: 0 12px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); font: inherit; color: var(--text);
}
.filter-select:focus, .filter-input:focus{
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 2px hsla(134, 61%, 48%, 0.12);
}

/* Footer */
.footer{
  margin-top: auto;
  background: #f8f9fa;
  border-top: 1px solid var(--border);
  padding: 20px 16px;
  text-align: center;
}
.copyright {
  margin: 0;
  padding-bottom: 8px;
}
.footer-heading{
  font-size: 18px; font-weight: 600;
  margin: 0 0 12px 0; color: var(--text);
}
.footer-links{
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  margin-bottom: 12px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.footer-link{
  color: var(--muted); text-decoration: none;
  font-size: 14px;
}
.footer-link:hover{
  color: var(--primary);
}

/* Individual link alignments */
.footer-link:nth-child(1) { text-align: right; }    /* Help - align right */
.footer-link:nth-child(2) { text-align: center; }   /* Terms of Use - center */
.footer-link:nth-child(3) { text-align: left; }     /* Safety Tips - align left */

/* Center "no results" message in listings */
.listings-wrap .muted,
.list .muted,
.grid .muted {
  text-align: center;
  margin: 40px 0;
  font-style: italic;
}

/* Search results header */
.search-results-header {
  padding: 1rem 1.5rem 0.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--background);
}

.search-results-header h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: center;
}

/* Listings page header - 3 column layout: Back | Sort/Filter | View buttons */
.listings-header{
  display: grid;
  grid-template-columns: minmax(auto, 1fr) minmax(auto, 1fr) minmax(auto, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--border);
}

/* Left column - back button */
.listings-header .back-btn {
  justify-self: start;
}

/* Middle column - sort/filter pill */
.listings-header .split-pill-wrap {
  justify-self: center;
}

/* Right column - view buttons */
.listings-header .view-group {
  justify-self: end;
}

/* On smaller screens, ensure each column can shrink properly */
@media (max-width: 640px) {
  .listings-header {
    gap: 8px;
    grid-template-columns: auto 1fr auto;
  }
  
  /* Ensure middle column doesn't get squeezed too much */
  .listings-header .split-pill-wrap {
    min-width: 0;
  }
}

.back-btn{
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  display: inline-flex; align-items: center; gap: 6px;
  font: inherit; color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.back-btn:hover{
  background: var(--surface-2);
  border-color: var(--primary);
}
.back-btn:focus-visible{
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px hsla(134, 61%, 48%, 0.12);
}

.view-group{
  display: flex; gap: 8px;
}

/* Result count above listings */
.result-count-above{
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
  padding: 8px 12px 4px;
  text-align: left;
}

/* Single controls row - Results + Pagination + Show */
.listings-controls{
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  padding: 12px;
  border-bottom: 1px solid var(--border);
  gap: 16px;
}


/* Simple wrap on smaller screens to prevent elements from going off screen */
@media (max-width: 480px) {
  .listings-controls {
    gap: 8px;
  }
}

/* Ensure pagination controls in listings-controls are centered */
.listings-controls .pagination-wrap{
  display: flex; align-items: center; gap: 8px;
}

.listings-controls .sort-wrap{
  display: flex; align-items: center; gap: 8px;
}

.listings-controls .lbl,
.listings-header .lbl{
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
}

/* Split Sort/Filters Pill */
.split-pill-wrap{
  position: relative;
  display: flex;
  align-items: center;
}

.split-pill{
  display: flex;
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  background: var(--surface);
}

.split-pill-left,
.split-pill-right,
.split-pill-full{
  background: none;
  border: none;
  padding: 8px 16px;
  font: inherit;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  transition: all 0.15s ease;
  position: relative;
}

.split-pill-full{
  justify-content: center;
  width: 100%;
}

/* Divider between left and right */
.split-pill-left::after{
  content: '';
  position: absolute;
  top: 6px;
  bottom: 6px;
  right: 0;
  width: 1px;
  background: var(--border);
}

.split-pill-left:hover,
.split-pill-right:hover,
.split-pill-full:hover{
  background: var(--accent-hover);
  color: var(--text);
}

.split-pill-left:focus-visible,
.split-pill-right:focus-visible,
.split-pill-full:focus-visible{
  outline: none;
  background: var(--accent-hover);
}

/* Dropdown panels for split pill */
.split-pill-wrap .sort-panel{
  position: absolute;
  top: 100%;

  margin-top: 4px;
  min-width: 160px;
  z-index: 1000;
}

/* Pagination controls row (centered below main controls) */
.pagination-controls-row{
  display: flex; 
  justify-content: center; 
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}

/* Pagination controls */
.pagination-wrap{
  display: flex; align-items: center; gap: 8px;
}

.pagination-btn{
  height: 36px; width: 36px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
}

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

.pagination-btn:not(:disabled):hover{
  background: var(--accent-hover);
  border-color: var(--accent-primary);
}

.pagination-btn:focus-visible{
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

.pagination-info{
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
  padding: 0 8px;
}

/* Per-page dropdown */
.per-page-wrap{
  position: relative;
  display: flex; align-items: center; gap: 8px;
}

/* View buttons */
.view-btn{
  height: 36px; min-width: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
}
.view-btn i{ pointer-events: none; }
.view-btn.is-active,
.view-btn[aria-pressed="true"]{
  background: var(--accent-bg);
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(37,99,235,.12);
  color: var(--accent-primary);
}
.view-btn:hover{
  background: var(--accent-hover);
  border-color: var(--accent-primary);
}
.view-btn:focus-visible{
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

/* Sort dropdown */
.sort-wrap{ 
  position: relative; 
  display: inline-block; 
  flex: 1 1 auto; 
  min-width: 0; 
}
.sort-pill{
  height: 42px;
  padding: 0 12px;
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); font: inherit; color: var(--text);
  max-width: 100%;
  cursor: pointer;
  transition: all 0.15s ease;
}
.sort-pill .caret{ 
  color: var(--muted); 
  transition: transform .15s ease; 
}
.sort-pill[aria-expanded="true"] .caret{ 
  transform: rotate(180deg); 
}
.sort-pill[aria-expanded="true"] {
  background: var(--accent-bg);
  border-color: var(--accent-primary);
  box-shadow: 0 2px 6px rgba(37,99,235,.1);
}
.sort-pill:focus-visible{
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
#sort-current{
  display: inline-block;
  max-width: 60vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#sort-panel{
  position: absolute; 
  top: 100%; 
  left: 0;
  margin-top: 4px;
  min-width: 120px;
  background: var(--surface); 
  border: 1px solid var(--border); 
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  padding: 8px; 
  z-index: 1200;
}

#dashboard-sort-panel{
  position: absolute; 
  top: 100%; 
  right: 0;
  margin-top: 4px;
  min-width: 120px;
  background: var(--surface); 
  border: 1px solid var(--border); 
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  padding: 8px; 
  z-index: 1200;
}

#dashboard-filter-panel{
  position: absolute; 
  top: 100%; 
  left: 0;
  margin-top: 4px;
  min-width: 120px;
  background: var(--surface); 
  border: 1px solid var(--border); 
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  padding: 8px; 
  z-index: 1200;
}
.sort-panel[hidden]{ display: none; }
#sort-panel .sort-opt, #dashboard-sort-panel .sort-opt, #dashboard-filter-panel .sort-opt{
  display: block; 
  width: 100%; 
  text-align: left;
  height: 40px; 
  padding: 0 12px; 
  margin: 2px 0;
  background: transparent; 
  border: none; 
  border-radius: 8px;
  font: inherit; 
  font-size: 14px;
  font-weight: 500;
  color: var(--text); 
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
}
#sort-panel .sort-opt:hover, #dashboard-sort-panel .sort-opt:hover, #dashboard-filter-panel .sort-opt:hover{
  background: var(--hover);
  color: var(--accent-primary);
}
#sort-panel .sort-opt:active, #dashboard-sort-panel .sort-opt:active, #dashboard-filter-panel .sort-opt:active{
  background: var(--accent-bg);
}

/* Breadcrumbs */
.breadcrumbs{
  font-size: 14px; color: var(--muted);
  border-bottom: 1px solid var(--border);
  padding: 6px 0;
  margin: -2px 0 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.breadcrumbs .sep{ 
  color: var(--muted); 
  margin: 0 6px; 
  opacity: 0.6;
}
.listings-wrap{ padding-top: 6px; }

/* Toolbar */
.toolbar{
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  margin: 8px 0 12px; padding: 0 12px;
}
.toolbar .spacer{ flex: 1 }
.toolbar select{
  height: 36px; border: 1px solid var(--border); border-radius: 8px; 
  background: var(--surface); font: inherit; padding: 0 10px;
  color: var(--text);
  transition: all 0.15s ease;
}
.toolbar select:focus{
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px hsla(134, 61%, 48%, 0.12);
}

/* Filters dropdown styling - scoped to listings page */
.filters-wrap { 
  position: relative; 
}

#filters-btn.sort-pill{
  min-width: 110px;
  justify-content: space-between;
}

/* Target the actual filters panel structure - positioned slightly left of right edge */
#filters-panel.sort-panel.filters-panel{
  position: absolute;
  top: 100%;
  right: -50px;
  margin-top: 4px;
  min-width: 280px;
  max-width: min(320px, calc(100vw - 32px));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  padding: 12px;
  z-index: 1200;
}

#filters-panel .row{
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 6px 0;
}

/* Price row - horizontal layout */
#filters-panel .price-row{
  display: flex;
  flex-direction: row;
  gap: 12px;
  margin: 6px 0;
}

#filters-panel .price-field{
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#filters-panel .price-field label{
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 4px;
}

#filters-panel .row label{
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 4px;
}

/* Style the input fields with higher specificity */
#filters-panel input[type="number"], 
#flt-min, 
#flt-max{
  width: 100% !important;
  height: 36px !important;
  padding: 6px 12px !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  font: inherit !important;
  font-size: 14px !important;
  background: var(--surface) !important;
  color: var(--text) !important;
  transition: all 0.15s ease !important;
}

/* Style the condition pill dropdown */
.condition-wrap {
  position: relative;
}

.condition-pill {
  width: 100% !important;
  height: 36px !important;
  padding: 6px 12px !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;
  background: var(--surface) !important;
  font: inherit !important;
  font-size: 14px !important;
  color: var(--text) !important;
  transition: all 0.15s ease !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  text-align: left;
}

.condition-pill:hover {
  border-color: var(--primary) !important;
}

.condition-pill:focus {
  outline: none !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 2px hsla(134, 61%, 48%, 0.12) !important;
}

.condition-pill[aria-expanded="true"] .caret { 
  transform: rotate(180deg); 
}

.condition-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  min-width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  padding: 8px;
  z-index: 1200;
  animation: panelPop .12s ease-out;
}

.condition-panel[hidden] { 
  display: none; 
}

.condition-opt {
  display: block;
  width: 100%;
  text-align: left;
  height: 36px;
  padding: 0 10px;
  margin: 2px 0;
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}

.condition-opt:hover {
  background: var(--hover);
  border-color: var(--border);
}

#filters-panel input[type="number"]:focus,
#flt-min:focus,
#flt-max:focus{
  outline: none !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 2px hsla(134, 61%, 48%, 0.12) !important;
}

#filters-panel input[type="number"]:hover,
#flt-min:hover,
#flt-max:hover{
  border-color: var(--primary) !important;
}


#filters-panel .btns{
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

#filters-panel .btns .btn{
  flex: 1 1 0 !important;
  height: 42px !important;
  padding: 0 16px !important;
  border: 1px solid var(--border) !important;
  border-radius: 10px !important;
  background: var(--surface) !important;
  font: inherit !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  text-decoration: none !important;
  color: var(--text) !important;
}

#filters-panel .btns .btn:hover{
  border-color: var(--primary) !important;
  background: var(--surface-2) !important;
}

#filters-panel .btns .btn-primary{
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
  color: white !important;
  border: none !important;
  font-weight: 600 !important;
  box-shadow: 0 10px 15px -3px rgba(0, 123, 255, 0.3), 0 4px 6px -2px rgba(0, 123, 255, 0.1) !important;
}

#filters-panel .btns .btn-primary:hover{
  background: linear-gradient(135deg, #0056b3 0%, #003d82 100%) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 20px 25px -5px rgba(0, 123, 255, 0.4), 0 10px 10px -5px rgba(0, 123, 255, 0.2) !important;
}

/* Form styles */
.form-container{
  max-width: 600px; margin: 0 auto;
  padding: 20px;
}
.form-group{
  margin-bottom: 20px;
}
.form-label{
  display: block; font-weight: 600; margin-bottom: 8px;
  color: var(--text);
}
.form-input, .form-textarea, .form-select{
  width: 100%; padding: 12px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); font: inherit; color: var(--text);
  resize: vertical;
}
.form-input:focus, .form-textarea:focus, .form-select:focus{
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 2px hsla(134, 61%, 48%, 0.12);
}
.form-hint{
  font-size: 14px; color: var(--muted);
  margin-top: 4px;
}

/* Button styles */
.btn{
  height: 42px; padding: 0 16px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); font: inherit;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .15s ease;
  text-decoration: none; color: var(--text);
}
.btn:hover{
  border-color: var(--primary);
  background: var(--surface-2);
}
.btn-primary{
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: white;
  border: none;
  font-weight: 600;
  box-shadow: 0 10px 15px -3px rgba(0, 123, 255, 0.3), 0 4px 6px -2px rgba(0, 123, 255, 0.1);
}
.btn-primary:hover{
  background: linear-gradient(135deg, #0056b3 0%, #003d82 100%);
  transform: translateY(-2px);
  box-shadow: 0 20px 25px -5px rgba(0, 123, 255, 0.4), 0 10px 10px -5px rgba(0, 123, 255, 0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hdr{
    grid-template-columns: 44px 1fr 60px;
    padding: 0 8px;
  }
  .search{
    padding: 8px;
  }
  .listings-grid{
    grid-template-columns: 1fr;
  }
  .footer-links{
    gap: 1rem; /* Smaller gap on mobile but keep horizontal */
  }
}

/* Submit page specific styles */
.submit-container{
  max-width: 800px; margin: 0 auto;
  padding: 20px;
}

/* Photo upload styles */
.photo-upload{
  border: 2px dashed var(--border);
  border-radius: 12px; padding: 40px 20px;
  text-align: center; background: var(--surface-2);
  cursor: pointer; transition: all .15s ease;
}
.photo-upload:hover{
  border-color: var(--primary);
  background: var(--accent-bg);
}
.photo-upload.dragover{
  border-color: var(--primary);
  background: var(--accent-bg);
}
.photo-grid{
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px; margin-top: 16px;
}
.photo-preview{
  position: relative; aspect-ratio: 1;
  border-radius: 8px; overflow: hidden;
}
.photo-preview img{
  width: 100%; height: 100%; object-fit: cover;
}
.photo-remove{
  position: absolute; top: 4px; right: 4px;
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(0,0,0,.8); color: white;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

/* Auth forms */
.auth-container{
  max-width: 400px; margin: 40px auto;
  padding: 32px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}
.auth-title{
  text-align: center; font-size: 24px; font-weight: 700;
  margin: 0 0 24px 0; color: var(--text);
}
.auth-link{
  text-align: center; margin-top: 16px;
}
.auth-link a{
  color: var(--primary); text-decoration: none;
}
.auth-link a:hover{
  text-decoration: underline;
}

/* Floating CTA visibility — single source of truth */
/* Default: hidden */
.fab-cta { display: none; }

/* Show on home and key routes */
body[data-route=""] .fab-cta,
body[data-route="home"] .fab-cta,
body[data-route="listings"] .fab-cta { display: block; }

/* Floating submit button (FAB) */
.fab-cta{
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(16px + env(safe-area-inset-bottom));
  background: var(--primary); color: var(--primary-contrast); text-decoration: none;
  padding: 14px 22px; border-radius: 999px; font-weight: 700;
  box-shadow: 0 8px 20px rgba(0,0,0,.18); z-index: 1300;
  transition: all 0.15s ease;
}
.fab-cta:active{ background: hsl(217, 91%, 54%) !important; /* Green */ }

/* Unverified user state - gray out the button */
.fab-cta.unverified {
  background: #9ca3af !important; /* Gray color */
  cursor: not-allowed !important;
  opacity: 0.8 !important;
  box-shadow: 0 4px 12px rgba(0,0,0,.12) !important; /* Reduced shadow */
}
.fab-cta.unverified:hover {
  background: #6b7280 !important; /* Darker gray on hover */
  opacity: 0.9 !important;
}
.fab-cta.unverified:active {
  background: #6b7280 !important; /* Darker gray on active */
}

/* Verification Modal */
.verification-overlay {
  position: fixed; inset: 0; z-index: 1400;
  background: rgba(0,0,0,0.5);
  display: grid; place-items: center;
  padding: 20px;
}

.verification-dialog {
  max-width: 400px; width: 100%;
  padding: 32px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  animation: modalSlideIn 0.2s ease;
}

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

.verification-title {
  text-align: center; font-size: 24px; font-weight: 700;
  margin: 0 0 24px 0; color: var(--text);
}

.verification-content {
  margin-bottom: 24px;
}

.verification-content p {
  margin: 0 0 12px 0; color: var(--text);
  line-height: 1.5;
}

.verification-hint {
  color: var(--text-muted) !important;
  font-size: 14px;
}

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

/* Footer Modal Styles */
.footer-modal-overlay {
  position: fixed; inset: 0; z-index: 1400;
  background: rgba(0,0,0,0.5);
  display: grid; place-items: center;
  padding: 20px;
}

.footer-modal-dialog {
  position: relative;
  max-width: 500px; width: 100%;
  max-height: 80vh;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border); 
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  animation: modalSlideIn 0.2s ease;
  overflow-y: auto;
}

.modal-close-btn {
  position: absolute;
  top: 16px; right: 16px;
  width: 32px; height: 32px;
  background: none; border: none;
  font-size: 24px; line-height: 1;
  color: var(--muted); cursor: pointer;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s ease;
}

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

.footer-modal-title {
  text-align: center; font-size: 24px; font-weight: 700;
  margin: 0 0 24px 0; color: var(--text);
  padding-right: 32px; /* Account for close button */
}

.footer-modal-content {
  color: var(--text);
  line-height: 1.6;
}

.footer-modal-content h3 {
  font-size: 20px; font-weight: 600;
  margin: 0 0 16px 0; color: var(--text);
}

.footer-modal-content h4 {
  font-size: 16px; font-weight: 600;
  margin: 20px 0 8px 0; color: var(--text);
}

.footer-modal-content p {
  margin: 0 0 12px 0; color: var(--text-secondary);
  line-height: 1.5;
}

.footer-modal-content h4:first-of-type {
  margin-top: 0;
}

/* Alert Modal Specific Styles */
.alert-modal-actions {
  text-align: center;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.alert-message {
  text-align: center;
  margin: 16px 0;
  font-size: 16px;
  line-height: 1.5;
}

/* Confirmation Modal Specific Styles */
.confirm-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.confirm-modal-actions .btn {
  min-width: 80px;
}

/* Submit page tweaks (unified selector) */
body[data-route^="submit"] .breadcrumbs { 
  margin-bottom: 8px; 
}

/* Hide top search row on submit and detail pages */
body[data-route^="submit"] .search,
body[data-route="listing-classic"] .search {
  display: none !important;
}

/* Header right side styling */
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-end;
}

/* Auth section styling */
.auth-section {
  display: flex;
  align-items: center;
}

.btn-primary {
  background: #fff;
  color: #1a73e8;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background: #f8f9fa;
  transform: translateY(-1px);
}

.user-menu {
  position: relative;
}

.user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.1);
  border: none;
  padding: 6px 12px;
  border-radius: 20px;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease;
}

.user-btn:hover {
  background: rgba(255,255,255,0.2);
}

.user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  min-width: 160px;
  z-index: 1001;
  margin-top: 4px;
}

.dropdown-item {
  display: block;
  width: 100%;
  padding: 12px 16px;
  text-align: left;
  background: none;
  border: none;
  color: #333;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.dropdown-item:hover {
  background: #f5f5f5;
}

.dropdown-divider {
  margin: 8px 0;
  border: none;
  border-top: 1px solid #eee;
}

/* ==================== MOBILE-FIRST MESSAGES INTERFACE ==================== */

/* Message list actions */
.message-list-actions {
  padding: 16px 12px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

/* Message thread header */
.msg-thread-header {
  padding: 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.thread-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.thread-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-contrast);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
}

.thread-username {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

/* Message thread scrollable area */
.msg-thread {
  height: calc(100vh - 56px - 80px - 70px); /* viewport - header - thread-header - input */
  overflow-y: auto;
  padding: 16px;
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Message bubbles */
.bubble {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 18px;
  word-wrap: break-word;
  position: relative;
}

.bubble.me {
  align-self: flex-end;
  background: var(--primary);
  color: var(--primary-contrast);
  border-bottom-right-radius: 6px;
}

.bubble.them {
  align-self: flex-start;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-bottom-left-radius: 6px;
}

.bubble-time {
  font-size: 11px;
  opacity: 0.7;
  margin-top: 4px;
  text-align: right;
}

.bubble.them .bubble-time {
  text-align: left;
}

/* Message input bar */
.msg-inputbar {
  position: sticky;
  bottom: 0;
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.msg-inputbar .message-form {
  margin: 0;
}

.msg-inputbar .input-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

.msg-inputbar input[type="text"] {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 16px;
  outline: none;
  min-height: 44px; /* iOS accessibility */
}

.msg-inputbar input[type="text"]:focus {
  border-color: var(--primary);
  background: var(--surface);
}

.msg-inputbar .btn {
  min-width: 60px;
  border-radius: 20px;
  white-space: nowrap;
}

/* Empty states */
.empty-state {
  text-align: center;
  padding: 40px 20px;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

/* Safe area handling for iOS */
.msg-thread {
  padding-bottom: env(safe-area-inset-bottom);
}

/* Message list card customizations for messages */
.message-threads-list .list-card-img {
  border-radius: 50%; /* Make avatar circular */
}

.message-threads-list .list-card-title {
  font-size: 16px;
  font-weight: 600;
}

.message-threads-list .list-card-desc {
  font-size: 14px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-threads-list .list-card-meta {
  justify-content: space-between;
  align-items: center;
}

.message-time-stamp {
  font-size: 12px;
  color: var(--muted);
}

.unread-badge {
  background: var(--primary);
  color: var(--primary-contrast);
  border-radius: 10px;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 600;
  min-width: 18px;
  text-align: center;
}

/* Unread conversation highlight */
.list-card.unread {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(29, 78, 216, 0.12));
  border: 1px solid rgba(59, 130, 246, 0.2);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.list-card.unread:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(29, 78, 216, 0.16));
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

/* ==================== DASHBOARD INTERFACE ==================== */

/* Section headers */
.section-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 12px 8px;
  margin: 24px 0 12px;
  border-bottom: 1px solid var(--border);
}

.section-hdr h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Count badges */
.count-badge {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #e5e7eb;
  color: #374151;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  margin-left: 8px;
  transform: translateY(-2px);
}

/* Profile section */
#dash-profile {
  margin-bottom: 12px;
}

.profile-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.profile-row:first-child {
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.profile-row:last-child {
  border-bottom: none;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

.profile-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-icon {
  color: var(--muted);
  font-size: 16px;
  width: 20px;
}

.profile-text {
  color: var(--text);
  font-size: 14px;
}

.profile-muted {
  color: var(--muted);
  font-style: italic;
}

.verified-icon {
  color: var(--primary);
  font-size: 14px;
  margin-left: 4px;
}

.unverified-badge {
  background: #fef3c7;
  color: #92400e;
  font-size: 12px;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
  border: 1px solid #fcd34d;
}

.btn-resend-verification {
  background: var(--primary);
  color: var(--primary-contrast);
  border: none;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 4px;
  margin-left: 6px;
  cursor: pointer;
  transition: background 0.15s ease;
}


/* Pending email change styles */
.pending-email-change {
  background-color: #fef3c7;
  border-left: 4px solid #f59e0b;
  margin: 8px 0;
  padding: 12px;
  border-radius: 6px;
}

.pending-email-change .profile-info {
  align-items: flex-start;
  flex-direction: column;
  gap: 8px;
}

.pending-icon {
  color: #f59e0b;
}

.pending-text {
  color: #92400e;
  font-weight: 500;
}

.pending-badge {
  background-color: #f59e0b;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.pending-actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
}

.pending-actions .btn {
  font-size: 12px;
  padding: 6px 12px;
}

.btn-resend-verification:hover {
  background: hsl(217, 91%, 54%);
}

.btn-resend-verification:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  opacity: 0.7;
}


/* Floating Submit Listing CTA */
.fab-cta {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(20px + env(safe-area-inset-bottom));
  background: var(--primary);
  color: var(--primary-contrast);
  padding: 14px 20px;
  border-radius: 28px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  z-index: 1000;
  transition: all 0.2s ease;
}

.fab-cta {
  /* Override to keep Submit Listing button green */
  background: hsl(134, 61%, 48%) !important; /* Green */
}

.fab-cta:hover {
  background: hsl(217, 91%, 54%) !important; /* Darker green */
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 12px 28px rgba(66,133,244,.3);
}

/* Dashboard spacing adjustments */
.view-wrap:has(.fab-cta) {
  padding-bottom: 80px;
}


/* Button sizing for dashboard */
.btn-small {
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
  border-radius: 6px;
}

/* ==================== EDIT PROFILE FORM ==================== */

/* Page header centered */
.page-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  padding: 0 12px;
}

.back-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 18px;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.back-btn:hover {
  background: var(--surface);
}

/* Profile form styling */
.profile-form {
  max-width: 500px;
  margin: 0 auto;
  padding: 0 12px;
}

.form-section {
  margin-bottom: 32px;
}

.field {
  margin-bottom: 20px;
}

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

.field-input,
.field-select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field-input:focus,
.field-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

/* Custom Dropdown Styling */
.custom-dropdown {
  position: relative;
  width: 100%;
}

.custom-dropdown-input {
  cursor: pointer;
  padding-right: 48px !important;
  user-select: none;
}

.custom-dropdown-input:focus {
  cursor: text;
}

.dropdown-arrow {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
  pointer-events: none;
  font-size: 14px;
  transition: transform 0.2s ease;
}

.custom-dropdown.open .dropdown-arrow {
  transform: translateY(-50%) rotate(180deg);
}

.dropdown-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border: 2px solid var(--border);
  border-top: none;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  display: none;
}

.custom-dropdown.open .dropdown-options {
  display: block;
}

.dropdown-option {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-light);
  transition: background-color 0.2s ease;
  font-size: 16px;
  color: var(--text);
}

.dropdown-option:last-child {
  border-bottom: none;
}

.dropdown-option:hover {
  background-color: rgba(var(--primary-rgb), 0.05);
}

.dropdown-option.selected {
  background-color: rgba(var(--primary-rgb), 0.1);
  color: var(--primary);
  font-weight: 500;
}

/* Mobile optimization */
@media (max-width: 768px) {
  .dropdown-options {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
  }
  
  .dropdown-option {
    padding: 16px;
    font-size: 16px;
    min-height: 48px;
    display: flex;
    align-items: center;
  }
}

/* Form actions */
.form-actions {
  display: flex;
  gap: 12px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
}

.form-actions .btn {
  flex: 1;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--border);
}

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

.btn-primary {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: white;
  border: none;
  box-shadow: 0 10px 15px -3px rgba(0, 123, 255, 0.3), 0 4px 6px -2px rgba(0, 123, 255, 0.1);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0056b3 0%, #003d82 100%);
  transform: translateY(-2px);
  box-shadow: 0 20px 25px -5px rgba(0, 123, 255, 0.4), 0 10px 10px -5px rgba(0, 123, 255, 0.2);
}

.btn-primary:disabled {
  background: #9ca3af;
  border-color: #9ca3af;
  color: #ffffff;
  cursor: not-allowed;
  opacity: 0.6;
}

.btn-primary:disabled:hover {
  background: #9ca3af;
  border-color: #9ca3af;
  transform: none;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .form-actions {
    flex-direction: column;
  }
  
  .form-actions .btn {
    width: 100%;
  }
}

/* ==================== SUCCESS BANNER ==================== */

.success-banner {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  margin: -12px -12px 24px -12px;
  padding: 16px 20px;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  animation: slideDown 0.3s ease-out;
}

.success-content {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 500px;
  margin: 0 auto;
}

.success-content i.fa-check-circle {
  font-size: 18px;
  color: white;
}

.success-content span {
  flex: 1;
  font-weight: 600;
  font-size: 14px;
}

.success-close {
  background: none;
  border: none;
  color: white;
  padding: 4px;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.success-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ==================== FULL-SCREEN LISTING-CLASSIC PAGE ==================== */

/* Image container - flexible aspect ratio for portrait/square/landscape images */
body[data-route="listing-classic"] .listing-img-container {
  max-height: 80vh;
  background: #f5f5f5;
  overflow: hidden;
  position: relative;
  width: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

body[data-route="listing-classic"] .listing-main-img {
  width: 100% !important;
  height: auto !important;
  max-height: 80vh !important;
  object-fit: contain !important;
  display: block !important;
}

/* Thumbnail strip */
body[data-route="listing-classic"] .listing-thumbs {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  overflow-x: auto;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

body[data-route="listing-classic"] .thumb {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.15s ease;
  background: var(--surface-2);
}

body[data-route="listing-classic"] .thumb:hover {
  border-color: var(--border);
}

body[data-route="listing-classic"] .thumb.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(66,133,244,.12);
}

/* ==================== SUBMIT-REVIEW PAGE FULL-WIDTH ==================== */

/* Make submit-review images work exactly like listing-classic */
body[data-route="submit-review"] .listing-img-container {
  max-height: 80vh;
  background: #f5f5f5;
  overflow: hidden;
  position: relative;
  width: 100vw;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

body[data-route="submit-review"] .listing-main-img {
  width: 100vw !important;
  height: auto !important;
  max-height: 80vh !important;
  object-fit: contain !important;
  display: block !important;
}

/* Content area padding - same as listing-classic */
body[data-route="submit-review"] .listing-content {
  padding: 16px;
  background: var(--surface);
}

/* Mobile responsive padding */
@media (max-width: 768px) {
  body[data-route="submit-review"] .listing-content {
    padding: 12px;
  }
}

body[data-route="listing-classic"] .thumb img {
  width: 100vw;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Content area */
body[data-route="listing-classic"] .listing-content {
  padding: 12px;
  background: var(--surface);
}

/* Title styling */
body[data-route="listing-classic"] .listing-title {
  margin: 0 0 4px 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

/* Meta information */
body[data-route="listing-classic"] .listing-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--muted);
}

body[data-route="listing-classic"] .listing-meta span {
  white-space: nowrap;
}

/* Badges */
body[data-route="listing-classic"] .badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

body[data-route="listing-classic"] .badge {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

/* Description */
body[data-route="listing-classic"] .listing-description {
  margin-top: 0;
  margin-bottom: 0;
  padding: 0;
}

body[data-route="listing-classic"] .listing-description p {
  margin: 0;
  padding: 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  white-space: pre-wrap;
}

/* Posted date below description */
body[data-route="listing-classic"] .listing-posted-date {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
}

/* Full-width contact bar */
body[data-route="listing-classic"] .listing-contact-bar {
  padding: 16px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  position: sticky;
  bottom: 0;
  z-index: 100;
}

body[data-route="listing-classic"] .contact-bar-button {
  width: 100%;
  padding: 16px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 12px;
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
  color: white !important;
  border: none !important;
  box-shadow: none !important;
}

body[data-route="listing-classic"] .contact-bar-button:hover {
  background: linear-gradient(135deg, #0056b3 0%, #003d82 100%) !important;
  transform: translateY(-2px) !important;
  box-shadow: none !important;
}

/* Navigation */
body[data-route="listing-classic"] .listing-navigation {
  padding: 16px;
  background: var(--surface);
}

body[data-route="listing-classic"] .back-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 0;
  display: inline-block;
  transition: color 0.15s ease;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

body[data-route="listing-classic"] .back-link:hover {
  color: var(--primary);
}

/* Mobile responsiveness */
@media (max-width: 480px) {
  body[data-route="listing-classic"] .listing-detail-container {
    padding: 12px 8px;
  }
  
  body[data-route="listing-classic"] .listing-card {
    border-radius: 0;
    margin-bottom: 0;
  }
  
  body[data-route="listing-classic"] .listing-content {
    padding: 12px;
  }
  
  body[data-route="listing-classic"] .listing-title {
    font-size: 20px;
  }
  
  body[data-route="listing-classic"] .listing-price {
    font-size: 18px;
  }
}

/* ============================================
   SUBMIT PROCESS STYLING - Polished Design
   ============================================ */

/* Form container */
#tmpl-submit .view-wrap { padding-top: 6px; }
#tmpl-submit-details .view-wrap { padding-top: 6px; }

#submit-form, #details-form {
  background:#fff;
  border:1px solid #ececec;
  border-radius:14px;
  padding:12px;
  box-shadow:0 6px 18px rgba(0,0,0,.04);
  max-width: 680px;
  margin: 8px auto;
}

/* Section headers */
#submit-form h3, #details-form h3 {
  font-size:15px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.4px;
  color:#2a2a2a;
  margin: 14px 0 10px;
}

/* Form sections spacing */
.form-sec + .form-sec{ margin-top: 16px; }

/* Make the pill controls full width and comfy */
#submit-form .city-wrap{ width: 100%; }
#submit-form .city-pill{
  min-width: 100%;
  justify-content: space-between;
}

/* Disabled pill / subcategory look */
#submit-form .city-pill[disabled]{
  opacity: .55;
  background: #f9fafb;
  border-style: dashed;
}

/* Inputs and selects—42px height to match buttons */
#submit-form .field input,
#submit-form .field select,
#details-form .field input,
#details-form .field select{
  width: 100%;
  padding: 16px 20px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 16px;
  font-family: inherit;
  transition: all 0.2s ease;
}

/* Textareas—5x taller than inputs, no resize */
#submit-form .field textarea,
#details-form .field textarea{
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  height: 210px;
  padding: 16px 20px;
  width: 100%;
  resize: none;
  font-size: 16px;
  font-family: inherit;
  transition: all 0.2s ease;
}

/* Main CTA: fill row, rounder, subtle lift */
#submit-form .btn-group, #details-form .btn-group { gap: 12px; }
#submit-form .btn-group .btn, #details-form .btn-group .btn { flex: 1 1 auto; }

/* Primary buttons */
#submit-form .btn-primary, #details-form .btn-primary {
  border-radius: 16px;
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  border: none;
  color: white;
}

#submit-form .btn-primary:hover, #details-form .btn-primary:hover {
  background: linear-gradient(135deg, #0056b3 0%, #003d82 100%);
  transform: translateY(-2px);
}

/* Back button style parity */
#submit-form .btn, #details-form .btn {
  border-radius: 16px;
}

/* Remove all shadows from submit form buttons */
#submit-form .btn:hover, #details-form .btn:hover {
  box-shadow: none;
}

#submit-form .btn:active, #details-form .btn:active {
  box-shadow: none;
}

#submit-form .btn:focus, #details-form .btn:focus {
  box-shadow: none;
}

/* City/Category/Subcategory "pill" controls */
.city-pill{
  transition:border-color .15s ease, box-shadow .15s ease, transform .02s ease;
}
.city-pill:hover{ border-color:#d7dbe2; }
.city-pill:active{ transform: translateY(1px); }

/* Panels */
.city-panel, .sort-panel{
  animation: panelPop .12s ease-out;
}
@keyframes panelPop{
  from{ opacity:0; transform: translateY(-2px) scale(.98); }
  to{ opacity:1; transform: translateY(0) scale(1); }
}

#submit-form .city-pill:hover:not([disabled]) {
  border-color: #007bff;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

#submit-form .city-pill:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1), 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

#submit-form .city-pill[aria-expanded="true"] {
  border-color: #007bff;
  background: #f0f8ff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Disabled state styling */
#submit-form .city-pill[disabled] {
  opacity: 0.6;
  background: #f9fafb;
  border-style: dashed;
  border-color: #d1d5db;
  cursor: not-allowed;
  transform: none;
}

#submit-form .city-pill[disabled]:hover {
  transform: none;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

/* Caret styling */
#submit-form .city-pill .caret {
  color: #6b7280;
  font-size: 16px;
  transition: all 0.2s ease;
}

#submit-form .city-pill[aria-expanded="true"] .caret {
  transform: rotate(180deg);
  color: #007bff;
}

/* Enhanced dropdown panels */
#submit-form .city-panel {
  position: absolute !important;
  margin-top: 4px !important;
  background: #ffffff !important;
  border: 1px solid var(--accent-border) !important; 
  border-left: 2px solid var(--accent-primary) !important;
  border-radius: 0 12px 12px 12px !important;
  box-shadow: 0 4px 12px rgba(0,0,0,.08) !important;
  padding: 12px !important;
  max-height: 320px;
  overflow-y: auto;
  width: 100%;
}

#submit-form .city-opt {
  height: 48px;
  padding: 0 16px;
  margin: 4px;
  border: 1px solid var(--accent-border);
  border-radius: 8px;
  background: transparent;
  font-size: 15px;
  font-weight: 500;
  color: #374151;
  transition: all 0.15s ease;
  cursor: pointer;
}

#submit-form .city-opt:hover {
  background: #f0f8ff;
  border-color: #007bff;
  color: #0056b3;
}

#submit-form .city-opt:active {
  background: #e6f3ff;
  transform: scale(0.98);
}

/* Inputs + selects + textarea */
.field input[type="text"],
.field input[type="number"],
.field input[type="email"],
.field input[type="file"],
.field select,
.field textarea{
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
  background:#fff;
}
.field input:focus,
.field select:focus,
.field textarea:focus{
  outline:none;
  border-color:#4285f4;
  box-shadow:0 0 0 3px rgba(66,133,244,.12);
}

/* Placeholder tone */
::placeholder{ color:#9aa3ad; }

/* Required star (auto if you add the HTML `required` attribute) */
.field label[for]::after{
  content: attr(data-req);
  margin-left:6px; color:#d33; font-weight:800;
}
.field label[for][data-req="*"]::after{ content:"*"; }

/* Required star for h3 headers */
h3[data-req]::after{
  content: attr(data-req);
  margin-left:6px; color:#d33; font-weight:800;
}
h3[data-req="*"]::after{ content:"*"; }

/* Buttons */
.btn{
  height:44px; padding:0 16px;
  border:1px solid #e5e7eb; border-radius:12px;
  background:#fff; font:inherit; font-weight:700;
  display:inline-flex; align-items:center; justify-content:center;
  transition: box-shadow .15s ease, transform .02s ease, border-color .15s ease, background-color .15s ease;
}
.btn:hover{ border-color:#d7dbe2; box-shadow:0 3px 10px rgba(0,0,0,.05); }
.btn:active{ transform: translateY(1px); }
.btn[disabled]{ opacity:.5; pointer-events:none; }

.btn-primary{
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: white;
  border: none;
  box-shadow: 0 10px 15px -3px rgba(0, 123, 255, 0.3), 0 4px 6px -2px rgba(0, 123, 255, 0.1);
}
.btn-primary:hover{
  background: linear-gradient(135deg, #0056b3 0%, #003d82 100%);
  transform: translateY(-2px);
  box-shadow: 0 20px 25px -5px rgba(0, 123, 255, 0.4), 0 10px 10px -5px rgba(0, 123, 255, 0.2);
}
.btn-primary:active{
  background: linear-gradient(135deg, #003d82 0%, #002654 100%);
  transform: translateY(0);
}

/* Button group spacing */
.btn-group{
  display:flex; gap:10px; margin-top:12px;
}
@media (max-width:480px){
  .btn-group{ flex-wrap:wrap; }
  .btn-group .btn{ flex:1 1 auto; }
}

#submit-form .btn-group .btn,
#details-form .btn-group .btn {
  flex: 1 1 auto;
  min-width: 140px;
  height: 48px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.025em;
  transition: all 0.2s ease;
}

/* Primary button styling */
#submit-form .btn-primary {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  border: none;
  color: white;
  box-shadow: 0 10px 15px -3px rgba(0, 123, 255, 0.3), 0 4px 6px -2px rgba(0, 123, 255, 0.1);
}

#submit-form .btn-primary:hover:not([disabled]) {
  transform: translateY(-2px);
  box-shadow: 0 20px 25px -5px rgba(0, 123, 255, 0.4), 0 10px 10px -5px rgba(0, 123, 255, 0.2);
}

#submit-form .btn-primary:active {
  transform: translateY(0);
}

#submit-form .btn-primary[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Secondary button styling */
#submit-form .btn:not(.btn-primary) {
  background: #ffffff;
  border: 2px solid #e5e7eb;
  color: #374151;
}

#submit-form .btn:not(.btn-primary):hover {
  border-color: #d1d5db;
  background: #f9fafb;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Cancel link styling */
#submit-form p {
  text-align: center;
  margin-top: 24px;
  padding: 0 16px;
}

#submit-form p a {
  color: #6b7280;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#submit-form p a:hover {
  color: var(--primary);
  text-decoration: none;
}

/* Form fields in submit details */
#submit-form .field {
  margin: 20px 0;
}

#submit-form .field label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

#submit-form .field input,
#submit-form .field select,
#submit-form .field textarea {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid #e5e7eb;
  border-radius: 16px;
  font-size: 16px;
  color: #374151;
  background: #ffffff;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

#submit-form .field input:focus,
#submit-form .field select:focus,
#submit-form .field textarea:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1), 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

#submit-form .field textarea {
  resize: vertical;
  min-height: 120px;
}

/* Hint text styling */
#submit-form .hint {
  background: #f0f8ff;
  border: 1px solid #b3d9ff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
  font-size: 14px;
  color: #0056b3;
  font-weight: 500;
}

#sel-summary,
#photos-summary {
  text-align: center;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  #tmpl-submit .view-wrap,
  #tmpl-submit-details .view-wrap {
    padding: 12px;
  }
  
  #submit-form,
  #details-form {
    padding: 24px 20px;
    border-radius: 16px;
  }
  
  #submit-form .btn-group,
  #details-form .btn-group {
    flex-direction: column;
  }
  
  #submit-form .btn-group .btn,
  #details-form .btn-group .btn {
    width: 100%;
  }
  
  .view-wrap .page-heading {
    font-size: 1.5rem;
  }
}

/* ============================================
   STEP PROGRESS INDICATOR STYLING
   ============================================ */

.step-progress {
  margin: 20px 0 30px 0;
  padding: 0 16px;
}

.step-container {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 500px;
  margin: 0 auto;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #e5e7eb;
  background: #ffffff;
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  transition: all 0.2s ease;
  margin-bottom: 8px;
}

.step-label {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-align: center;
  line-height: 1.2;
  transition: color 0.2s ease;
  min-height: 28px;
  max-height: 28px;
}

.step-line {
  height: 2px;
  background: #e5e7eb;
  flex: 1;
  margin: 0 8px;
  margin-bottom: 32px;
  transition: background-color 0.2s ease;
}

/* Active step styling */
.step.active .step-circle {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  border: none;
  color: #ffffff;
}

.step.active .step-label {
  color: #374151;
  font-weight: 700;
}

/* Completed step styling */
.step.completed .step-circle {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  border: none;
  color: #ffffff;
}

.step.completed .step-label {
  color: #6b7280;
  font-weight: 600;
}

.step.completed + .step-line {
  background: linear-gradient(90deg, #007bff 0%, #0056b3 100%);
}

/* Mobile responsive adjustments */
@media (max-width: 480px) {
  .step-progress {
    margin: 16px 0 24px 0;
    padding: 0 8px;
  }
  
  .step-container {
    max-width: 100%;
  }
  
  .step-circle {
    width: 32px;
    height: 32px;
    font-size: 14px;
    margin-bottom: 6px;
  }
  
  .step-label {
    font-size: 11px;
  }
  
  .step-line {
    margin: 0 4px;
    margin-bottom: 26px;
  }
}

/* Photos Page Styling */
#photos-form .form-sec {
  padding-left: 12px;
  padding-right: 12px;
}

#photos-form .btn-group .btn {
  height: 48px;
  border-radius: 16px;
}

.section-heading {
  font-size: 1.25rem;
  font-weight: 700;
  color: #333;
  margin: 0 0 12px 0;
  text-align: center;
}

.section-desc {
  color: #666;
  font-size: 0.95rem;
  text-align: center;
  margin: 0 0 32px 0;
  line-height: 1.4;
}

.photo-action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 12px;
}

.photo-action-btn {
  padding: 20px 16px;
  border: 2px solid;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-height: 80px;
}

.photo-action-btn.camera {
  border-color: #4285f4;
  color: #4285f4;
}

.photo-action-btn.camera:hover {
  background: #4285f4;
  color: #fff;
}

.photo-action-btn.upload {
  border-color: #4285f4;
  color: #4285f4;
}

.photo-action-btn.upload:hover {
  background: #4285f4;
  color: #fff;
}

.photo-action-btn i {
  font-size: 1.5rem;
}

.btn-group-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 32px;
}

.btn.btn-secondary {
  background: #f5f5f5;
  color: #666;
  border: 1px solid #ddd;
}

.btn.btn-secondary:hover {
  background: #e8e8e8;
  color: #555;
}

.previews {
  margin: 24px 0 48px 0;
}

.photo-carousel-container {
  position: relative;
  width: 100vw;
  margin-left: -12px;
  margin-right: -12px;
  overflow: hidden;
  border-radius: 0px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Fix carousel centering specifically for edit listing page */
#edit-photos-previews .photo-carousel-container {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  max-height: 400px;
  border-radius: 8px;
}

#edit-photos-previews .preview {
  max-height: 400px;
}

#edit-photos-previews .preview img {
  max-height: 400px;
}

.photo-carousel {
  display: flex;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  touch-action: pan-y pinch-zoom;
}

.preview {
  flex: 0 0 100%;
  width: 100%;
  max-height: 80vh;
  border-radius: 0px;
  overflow: hidden;
  border: 1px solid #e0e0e0;
  position: relative;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview img {
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
  display: block;
}

.preview .rm {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0,0,0,0.8);
  color: white;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.photo-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  padding: 0 16px;
}

.photo-dot {
  padding: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ddd;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.photo-dot.active {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  transform: scale(1.2);

}

@media (max-width: 768px) {
  .photo-action-grid {
    gap: 12px;
  }
  
  .photo-action-btn {
    padding: 16px 12px;
    min-height: 70px;
    font-size: 0.9rem;
  }
  
  .btn-group-split {
    gap: 12px;
  }
}

/* Hide file inputs completely */
.file-input-ghost {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

/* Contact Preferences Styling */
.contact-preferences {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.contact-pref-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.contact-pref-option:hover {
  border-color: var(--accent-primary);
  background: var(--accent-bg);
}

.contact-pref-option input[type="checkbox"] {
  margin: 0;
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.contact-pref-option input[type="checkbox"]:checked + .contact-pref-label {
  color: var(--primary);
}

.contact-pref-option:has(input[type="checkbox"]:checked) {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(66, 133, 244, 0.08) 0%, rgba(66, 133, 244, 0.12) 100%);
}

.contact-pref-label {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  font-size: 14px;
  color: var(--text);
  transition: color 0.2s ease;
}

.contact-pref-label i {
  font-size: 16px;
  color: var(--muted);
  transition: color 0.2s ease;
}

.contact-pref-option:has(input[type="checkbox"]:checked) .contact-pref-label i {
  color: var(--primary);
}

/* ✨ ENHANCED CHECKBOX STYLING FOR CONTACT PREFERENCES */
.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}

@media (max-width: 480px) {
  .checkbox-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

.checkbox-item {
  position: relative;
  cursor: pointer;
  user-select: none;
}

.checkbox-item input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
}

.checkbox-label::before {
  content: '';
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  transition: all 0.2s ease;
  flex-shrink: 0;
  position: relative;
}

/* Hover effects */
.checkbox-item:hover .checkbox-label {
  border-color: var(--primary);
  background: rgba(66, 133, 244, 0.02);
}

.checkbox-item:hover .checkbox-label::before {
  border-color: var(--primary);
}

/* Checked state */
.checkbox-item input[type="checkbox"]:checked + .checkbox-label {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(66, 133, 244, 0.08) 0%, rgba(66, 133, 244, 0.12) 100%);
  color: var(--primary);
}

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

.checkbox-item input[type="checkbox"]:checked + .checkbox-label::after {
  content: '✓';
  position: absolute;
  left: 22.5px;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 14px;
  font-weight: bold;
  line-height: 1;
}

/* Focus state for accessibility */
.checkbox-item input[type="checkbox"]:focus + .checkbox-label {
  box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
  outline: none;
}

/* Disabled state */
.checkbox-item input[type="checkbox"]:disabled + .checkbox-label {
  opacity: 0.6;
  cursor: not-allowed;
  background: var(--disabled-bg);
  color: var(--disabled-text);
}

.checkbox-item input[type="checkbox"]:disabled + .checkbox-label::before {
  background: var(--disabled-bg);
  border-color: var(--disabled-text);
}

@media (max-width: 480px) {
  .contact-preferences {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .contact-pref-option {
    padding: 10px 12px;
  }
}

/* Contact Popup Modal Styling */
.contact-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.contact-dialog {
  background: var(--surface);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  position: relative;
}

.contact-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.contact-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.contact-close {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--muted-bg);
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.contact-close:hover {
  background: var(--border);
  color: var(--text);
}

.contact-content {
  padding: 24px;
  max-height: calc(90vh - 100px);
  overflow-y: auto;
}

.contact-listing-info {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.contact-listing-info h4 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.contact-listing-info p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

/* Seller Language Preferences */
.contact-languages {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.contact-languages-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  margin: 0;
  font-weight: 500;
}

.contact-languages-label i {
  font-size: 16px;
  color: var(--accent-primary);
}

.contact-methods {
  margin-bottom: 16px;
}

.contact-methods-label {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  margin: 0 0 16px 0;
}

.contact-method-grid {
  display: grid;
  gap: 12px;
}

.contact-method-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  width: 100%;
  font-family: inherit;
  position: relative;
  overflow: hidden;
}

.contact-method-btn:hover {
  border-color: var(--accent-primary);
  background: var(--accent-bg);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.contact-method-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.15);
}

.contact-method-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.contact-method-btn:hover .contact-method-icon {
  background: var(--accent-primary);
  color: white;
}

.contact-method-icon i {
  font-size: 18px;
  color: var(--accent-primary);
  transition: color 0.2s ease;
}

.contact-method-btn:hover .contact-method-icon i {
  color: white;
}

.contact-method-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-method-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  transition: color 0.2s ease;
}

.contact-method-desc {
  font-size: 14px;
  color: var(--muted);
  transition: color 0.2s ease;
}

.contact-method-btn:hover .contact-method-name {
  color: var(--accent-primary);
}

.contact-method-btn:hover .contact-method-desc {
  color: var(--text);
}

/* Contact fallback styling */
.contact-fallback {
  text-align: center;
  padding: 32px 20px;
}

.contact-fallback-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.contact-fallback-content i {
  font-size: 32px;
  color: var(--warning);
}

.contact-fallback-content p {
  font-size: 16px;
  color: var(--muted);
  margin: 0;
}

/* Mobile responsiveness */
@media (max-width: 480px) {
  .contact-overlay {
    padding: 12px;
  }
  
  .contact-dialog {
    border-radius: 12px;
    max-height: 95vh;
  }
  
  .contact-header {
    padding: 16px 20px;
  }
  
  .contact-title {
    font-size: 18px;
  }
  
  .contact-content {
    padding: 20px;
  }
  
  .contact-method-btn {
    padding: 14px 16px;
    gap: 14px;
  }
  
  .contact-method-icon {
    width: 40px;
    height: 40px;
  }
  
  .contact-method-icon i {
    font-size: 16px;
  }
  
  .contact-method-name {
    font-size: 15px;
  }
  
  .contact-method-desc {
    font-size: 13px;
  }
}

/* Cropper Modal Styles */
.cropper-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.9);
  display: block;
  z-index: 9999;
  padding: 0;
}

.cropper-dialog {
  background: white;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cropper-head {
  padding: 8px;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  font-weight: 600;
  font-size: 14px;
  text-align: center;
  flex-shrink: 0;
}

.cropper-body {
  flex: 1;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 0;
}

.cropper-body img {
  max-width: 100%;
  max-height: 100%;
  display: block;
}

.cropper-actions {
  padding: 8px;
  background: #f8f9fa;
  border-top: 1px solid #e9ecef;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-shrink: 0;
}

.cropper-actions .btn {
  min-width: 100px;
}

/* Mobile responsive for cropper - Keep full screen */
@media (max-width: 768px) {
  .cropper-head {
    padding: 6px;
    font-size: 12px;
  }
  
  .cropper-actions {
    padding: 6px;
    gap: 8px;
  }
  
  .cropper-actions .btn {
    min-width: 80px;
    font-size: 14px;
  }
}

.footer-new {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: white;
  margin-top: auto;
  flex-shrink: 0;
}

.footer-container {
  max-width: 896px; /* max-w-4xl */
  margin: 0 auto;
  padding: 1rem;
}

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

.footer-description {
  color: #d1d5db; /* text-gray-300 */
  margin-bottom: 0.75rem;
  font-size: 1.125rem; /* text-lg */
  margin-top: 0;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem; /* gap-8 */
  margin-bottom: 0.75rem;
  flex-wrap: nowrap;
}

.footer-link {
  color: #d1d5db; /* text-gray-300 */
  text-decoration: none;
  font-size: 0.75rem; /* text-xs */
  transition: color 0.2s ease;
  
}

.footer-link:hover {
  color: white;
}

.footer-copyright {
  border-top: 0.5px solid white;
  padding-top: 0.75rem;
  padding-bottom: 0.5rem;
  text-align: center;
  font-size: 0.875rem; /* text-sm */
  color: #9ca3af; /* text-gray-400 */
}

.footer-copyright p {
  margin: 0;
}

.footer-spacer {
  height: 3rem; /* h-12 */
}

/* ===============================
   MESSAGING INTERFACE STYLES
   =============================== */

/* Messaging Container Layout */
.messages-container {
  display: flex;
  height: calc(100vh - 200px);
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  overflow: hidden;
}

/* Conversations Panel (Left Side) */
.conversations-panel {
  width: 350px;
  border-right: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
}

.conversations-header {
  padding: 20px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}

.conversations-header h3 {
  margin: 0;
  color: #1f2937;
  font-size: 18px;
  font-weight: 600;
}

.conversations-list {
  flex: 1;
  overflow-y: auto;
}

.conversation-item {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #f3f4f6;
  cursor: pointer;
  transition: background-color 0.2s;
}

.conversation-item:hover {
  background: #f9fafb;
}

.conversation-item.active {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
}

.conversation-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6b7280, #4b5563);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  margin-right: 12px;
  flex-shrink: 0;
}

.conversation-item.active .conversation-avatar {
  background: rgba(255, 255, 255, 0.2);
}

.conversation-details {
  flex: 1;
  min-width: 0;
}

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

.conversation-name {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conversation-time {
  font-size: 12px;
  color: #6b7280;
  flex-shrink: 0;
  margin-left: 8px;
}

.conversation-item.active .conversation-time {
  color: rgba(255, 255, 255, 0.8);
}

.conversation-listing {
  margin: 0;
  font-size: 13px;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conversation-item.active .conversation-listing {
  color: rgba(255, 255, 255, 0.9);
}

.conversations-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.conversations-empty .empty-state {
  text-align: center;
  color: #6b7280;
}

.conversations-empty .empty-state i {
  font-size: 48px;
  margin-bottom: 16px;
  color: #d1d5db;
}

.conversations-empty .empty-state h4 {
  margin: 0 0 8px 0;
  color: #374151;
}

/* Chat Panel (Right Side) */
.chat-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.chat-placeholder {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f9fafb;
}

.chat-welcome {
  text-align: center;
  color: #6b7280;
}

.chat-welcome i {
  font-size: 64px;
  margin-bottom: 20px;
  color: #d1d5db;
}

.chat-welcome h3 {
  margin: 0 0 8px 0;
  color: #374151;
}

.chat-window {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.chat-header {
  padding: 20px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
  display: flex;
  align-items: center;
  gap: 16px;
}

.chat-info h4 {
  margin: 0 0 4px 0;
  color: #1f2937;
  font-size: 16px;
  font-weight: 600;
}

.chat-info p {
  margin: 0;
  color: #6b7280;
  font-size: 14px;
}

.chat-close-btn {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 18px;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.chat-close-btn:hover {
  background: #e5e7eb;
  color: #374151;
}

/* Chat Messages Area */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  padding-bottom: 120px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.message-bubble {
  max-width: 70%;
  margin-bottom: 4px;
}

.message-bubble.sent {
  align-self: flex-end;
}

.message-bubble.received {
  align-self: flex-start;
}

.message-content {
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.4;
  word-wrap: break-word;
}

.message-bubble.sent .message-content {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  border-bottom-right-radius: 4px;
}

.message-bubble.received .message-content {
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
  color: white;
  border-bottom-left-radius: 4px;
}

.message-time {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 4px;
  text-align: right;
}

.message-bubble.received .message-time {
  text-align: left;
}

/* Listing Reference Messages */
.message-bubble.listing-reference .message-content {
  padding: 8px;
  background: transparent;
}

.listing-reference-button {
  width: 100%;
  padding: 12px 16px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.listing-reference-button:hover {
  background: linear-gradient(135deg, #16a34a, #15803d);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.listing-reference-button:active {
  transform: translateY(0);
}


/* Chat Input Area */
.chat-input-container {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  border-top: 1px solid #e5e7eb;
  background: #fff;
  z-index: 100;
}

/* Hide footer on thread page for cleaner chat interface */
#app:has(.chat-window) ~ .footer-new {
  display: none;
}

/* Fallback for browsers that don't support :has() */
body:has(.chat-window) .footer-new {
  display: none;
}

/* Center the Messages header */
.content-header h1 {
  text-align: center;
}

.chat-input-form .input-group {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.chat-input-form textarea {
  flex: 1;
  border: 1px solid #d1d5db;
  border-radius: 20px;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.4;
  resize: none;
  outline: none;
  max-height: 100px;
  min-height: 44px;
  transition: border-color 0.2s;
}

.chat-input-form textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.send-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.send-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .messages-container {
    flex-direction: column;
    height: calc(100vh - 140px);
  }
  
  .conversations-panel {
    width: 100%;
    height: 200px;
  }
  
  .chat-panel {
    height: calc(100% - 200px);
  }
  
  .message-bubble {
    max-width: 85%;
  }
  
  .conversation-item {
    padding: 12px 16px;
  }
  
  .chat-header {
    padding: 16px;
  }
  
  .chat-messages {
    padding: 16px;
    padding-bottom: 100px;
  }
  
  .chat-input-container {
    padding: 16px;
  }
}

/* ===============================
   QUICK MESSAGE MODAL STYLES
   =============================== */

.quick-message-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.quick-message-dialog {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow: hidden;
  animation: quickMessageSlideIn 0.3s ease-out;
}

@keyframes quickMessageSlideIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.quick-message-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}

.quick-message-title {
  margin: 0;
  color: #1f2937;
  font-size: 18px;
  font-weight: 600;
}

.quick-message-close {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 18px;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.quick-message-close:hover {
  background: #e5e7eb;
  color: #374151;
}

.quick-message-content {
  padding: 24px;
}

.quick-message-listing-info {
  margin-bottom: 20px;
  padding: 16px;
  background: #f3f4f6;
  border-radius: 8px;
  border-left: 4px solid #3b82f6;
}

.quick-message-listing-info h4 {
  margin: 0 0 4px 0;
  color: #1f2937;
  font-size: 16px;
  font-weight: 600;
}

.quick-message-listing-info p {
  margin: 0;
  color: #6b7280;
  font-size: 14px;
}

.quick-message-form .form-group {
  margin-bottom: 20px;
}

.quick-message-form label {
  display: block;
  margin-bottom: 8px;
  color: #374151;
  font-weight: 500;
  font-size: 14px;
}

.quick-message-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
  resize: none;
  min-height: 100px;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.quick-message-form textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.character-count {
  text-align: right;
  margin-top: 4px;
  font-size: 12px;
  color: #6b7280;
}

.character-count.warning {
  color: #f59e0b;
}

.character-count.error {
  color: #ef4444;
}

.quick-message-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

.quick-message-actions .btn {
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  gap: 8px;
}

.quick-message-actions .btn-secondary {
  background: #f9fafb;
  color: #374151;
  border-color: #d1d5db;
}

.quick-message-actions .btn-secondary:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.quick-message-actions .btn-primary {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  border-color: #3b82f6;
}

.quick-message-actions .btn-primary:hover {
  background: linear-gradient(135deg, #2563eb, #1e40af);
  transform: translateY(-1px);
}

.quick-message-actions .btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Mobile Responsive for Quick Message Modal */
@media (max-width: 768px) {
  .quick-message-overlay {
    padding: 16px;
  }
  
  .quick-message-dialog {
    max-height: 95vh;
  }
  
  .quick-message-header {
    padding: 16px 20px;
  }
  
  .quick-message-content {
    padding: 20px;
  }
  
  .quick-message-actions {
    flex-direction: column-reverse;
    gap: 8px;
  }
  
  .quick-message-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Payment Checkout Styles */
.checkout-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 24px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.checkout-header {
  text-align: center;
  margin-bottom: 32px;
}

.checkout-header h2 {
  margin: 0 0 8px 0;
  color: var(--text);
  font-size: 24px;
  font-weight: 600;
}

.checkout-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.premium-options {
  margin-bottom: 24px;
}

.premium-option {
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.premium-option:hover {
  border-color: var(--accent-primary);
}

.premium-option.selected {
  border-color: var(--accent-primary);
  background: rgba(37, 99, 235, 0.05);
}

.option-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.feature-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-primary);
}

.option-title {
  flex: 1;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}

.option-price {
  font-weight: 700;
  color: var(--accent-primary);
  font-size: 16px;
}

.option-desc {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.4;
  margin-left: 30px;
}

.checkout-summary {
  border-top: 2px solid var(--border);
  padding-top: 16px;
  margin-bottom: 24px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 14px;
}

.summary-row.total {
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  border-top: 1px solid var(--border);
  padding-top: 8px;
  margin-top: 8px;
}

#stripe-payment-element {
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fafafa;
}

.checkout-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checkout-actions .btn {
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
}

/* Premium listing badges */
.listing-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  margin-left: 8px;
}

.listing-badge.featured {
  background: #fef3c7;
  color: #92400e;
}

.listing-badge.highlight {
  background: #dbeafe;
  color: #1e40af;
}

.listing-badge.urgent {
  background: #fee2e2;
  color: #dc2626;
}

.premium-listing {
  border-left: 4px solid var(--accent-primary);
  background: rgba(37, 99, 235, 0.02);
}

/* Responsive */
@media (max-width: 768px) {
  .checkout-container {
    margin: 16px;
    padding: 20px;
  }
  
  .checkout-header h2 {
    font-size: 20px;
  }
  
  .option-desc {
    margin-left: 0;
    margin-top: 8px;
  }
}

/* ================================
   ADMIN PANEL STYLES
   ================================ */

.admin-panel {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 0;
}

.admin-header {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding: 2rem;
  text-align: center;
  color: white;
}

.admin-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.admin-subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
  font-weight: 300;
}

.admin-nav {
  display: flex;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  padding: 1rem;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.admin-nav-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.admin-nav-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.admin-nav-btn.active {
  background: rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.admin-section {
  display: none;
  padding: 2rem;
  background: white;
  margin: 0 1rem 1rem;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.admin-section.active {
  display: block;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: linear-gradient(135deg, #f8f9ff 0%, #e8f2ff 100%);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid #e1e8f0;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-3px);
}

.stat-icon {
  background: linear-gradient(135deg, var(--primary), #5a67d8);
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.stat-content {
  flex: 1;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-light);
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.stat-change {
  font-size: 0.8rem;
  color: #64748b;
}

.stat-change.positive {
  color: #059669;
}

.quick-actions {
  background: #f8f9ff;
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid #e1e8f0;
}

.quick-actions h3 {
  margin: 0 0 1rem 0;
  color: var(--text);
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.action-btn {
  background: white;
  border: 1px solid #e1e8f0;
  padding: 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 500;
  color: var(--text);
}

.action-btn:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-header h2 {
  margin: 0;
  color: var(--text);
}

.filter-controls {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.admin-select {
  padding: 0.5rem 0.75rem;
  border: 1px solid #e1e8f0;
  border-radius: 6px;
  background: white;
  color: var(--text);
  min-width: 150px;
}

.admin-input {
  padding: 0.5rem 0.75rem;
  border: 1px solid #e1e8f0;
  border-radius: 6px;
  background: white;
  color: var(--text);
  min-width: 200px;
}

.loading-spinner {
  text-align: center;
  padding: 3rem;
  color: var(--text-light);
}

.loading-spinner i {
  margin-right: 0.5rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.admin-table th {
  background: #f8f9ff;
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid #e1e8f0;
}

.admin-table td {
  padding: 1rem;
  border-bottom: 1px solid #f1f3f4;
  color: var(--text);
}

.admin-table tr:hover {
  background: #f8f9ff;
}

.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.status-active {
  background: #dcfce7;
  color: #166534;
}

.status-inactive {
  background: #fef2f2;
  color: #991b1b;
}

.admin-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  margin: 0 0.2rem;
  transition: all 0.2s ease;
}

.admin-btn:hover {
  background: #4338ca;
  transform: translateY(-1px);
}

.admin-btn.danger {
  background: #dc2626;
}

.admin-btn.danger:hover {
  background: #b91c1c;
}


/* ================================
   CATEGORY MANAGEMENT STYLES
   ================================ */

.categories-management {
  margin-top: 1.5rem;
}

.categories-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.category-item {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  position: relative;
}

.category-item:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.category-item.dragging {
  opacity: 0.5;
  transform: rotate(2deg);
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.category-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.category-icon {
  font-size: 1.5rem;
  color: var(--primary);
  width: 32px;
  text-align: center;
}

.category-details h3 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
}

.subcategory-count {
  font-size: 0.875rem;
  color: var(--text-light);
}

.category-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.category-actions .btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

.drag-handle {
  cursor: move;
  color: #9ca3af;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  margin-left: 0.5rem;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.drag-handle:hover {
  background-color: #f3f4f6;
  color: #374151;
}

.subcategories-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #f3f4f6;
}

.subcategory-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
}

.subcategory-item:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.subcategory-item.dragging {
  opacity: 0.5;
  transform: scale(0.95);
}

.subcategory-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  flex: 1;
}

.subcategory-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.subcategory-actions .btn {
  padding: 0.125rem 0.25rem;
  font-size: 0.75rem;
  min-width: auto;
}

.subcategory-actions .drag-handle {
  margin-left: 0.25rem;
  padding: 0.25rem;
  font-size: 0.75rem;
}

/* Modal Styles for Category Management */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-dialog {
  background: white;
  border-radius: 8px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: #9ca3af;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: all 0.2s;
}

.modal-close:hover {
  background: #f3f4f6;
  color: #374151;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
}

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

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.form-control {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.875rem;
  background: white;
  transition: all 0.2s;
  box-sizing: border-box;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Button Size Variants */
.btn-xs {
  padding: 0.125rem 0.375rem;
  font-size: 0.75rem;
  line-height: 1;
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

/* Drag and Drop Visual Feedback */
.sortable {
  position: relative;
}

.drag-over {
  background: #dbeafe;
  border-color: #3b82f6;
}

.drop-indicator {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}

.drop-indicator.active {
  opacity: 1;
}

/* Responsive Design for Category Management */
@media (max-width: 768px) {
  .category-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .category-actions {
    width: 100%;
    justify-content: flex-end;
  }
  
  .subcategories-list {
    grid-template-columns: 1fr;
  }
  
  .modal-dialog {
    margin: 1rem;
    width: calc(100% - 2rem);
  }
  
  .modal-footer {
    flex-direction: column;
  }
  
  .modal-footer .btn {
    width: 100%;
  }
}

/* ================================
   NEWS PAGE STYLES
   ================================ */

.news-header {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 0;
  padding: 8px 0;
}

.news-header .back-btn {
  position: relative;
  z-index: 2;
}

.news-breadcrumb {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 20px;
  color: var(--text-light);
  text-align: center;
  white-space: nowrap;
}

.news-breadcrumb span[data-key="categories.community"] {
  color: var(--text-dark);
  font-weight: 500;
}

.news-breadcrumb span[data-key="community_subs.news"] {
  color: var(--text-dark);
  font-weight: normal;
}

.news-breadcrumb .breadcrumb-separator {
  margin: 0 12px;
  color: var(--text-light);
}

.news-city-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 0;
  margin-top: 0;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 0;
  flex-wrap: wrap;
}

.news-city-tab {
  background: transparent;
  border: none;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 3px solid transparent;
  position: relative;
  bottom: -2px;
}

.news-city-tab:hover {
  color: var(--primary);
}

.news-city-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 16px;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #f3f4f6;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 12px;
}

.news-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.news-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.news-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: #f3f4f6;
}

.news-card-content {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.news-city-badge {
  display: inline-block;
  background: var(--primary);
  color: white;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  margin-bottom: 12px;
  width: fit-content;
}

.news-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 12px 0;
  line-height: 1.4;
}

.news-description {
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 16px 0;
  flex: 1;
}

.news-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid #f3f4f6;
  margin-bottom: 12px;
  font-size: 13px;
}

.news-source {
  color: var(--primary);
  font-weight: 500;
}

.news-date {
  color: var(--text-light);
}

.news-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s ease;
}

.news-link:hover {
  gap: 8px;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
}

.empty-state p {
  font-size: 16px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .news-grid {
    grid-template-columns: 1fr;
  }
  
  .news-city-tabs {
    gap: 8px;
  }
  
  .news-city-tab {
    padding: 10px 16px;
    font-size: 14px;
  }
}

/* =====================
   ARTICLE DETAIL PAGE
   ===================== */

.article-detail {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 60px;
}

.article-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e5e7eb;
}

.article-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 16px 0;
  line-height: 1.3;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--text-light);
}

.article-source {
  color: var(--primary);
  font-weight: 600;
}

.article-city {
  color: var(--text-light);
  font-weight: 500;
}

.article-meta-separator {
  color: var(--text-light);
  opacity: 0.5;
}

.article-date {
  color: var(--text-light);
}

.article-image-container {
  margin: 0 0 32px 0;
  border-radius: 12px;
  overflow: hidden;
}

.article-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.article-summary {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 40px;
  white-space: pre-wrap;
}

.article-footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: center;
}

.article-source-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.article-source-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.article-source-btn i {
  font-size: 14px;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .article-detail {
    padding: 24px 24px;
  }

  .article-header {
    margin-bottom: 24px;
    padding-bottom: 20px;
  }

  .article-title {
    font-size: 24px;
    margin-bottom: 12px;
  }

  .article-meta {
    font-size: 13px;
    gap: 8px;
  }

  .article-summary {
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 32px;
  }

  .article-footer {
    margin-top: 32px;
  }

  .article-source-btn {
    padding: 10px 20px;
    font-size: 14px;
  }
}

