/* ===========================================================
   00. SHARED BASE COMPONENTS — Card, Button, Avatar, Badge, Page Header, Skeleton
   =========================================================== */

/* --- 0.0 Page Header (used by detail page) --- */
.xos-page-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--spacing-page);
  min-height: 52px;
  background: var(--md-surface);
  border-bottom: 1px solid var(--md-outline);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky, 200);
  contain: layout style paint;
}

.page-back-btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border: none; background: transparent; cursor: pointer;
  border-radius: var(--radius-full);
  color: var(--md-on-surface);
  flex-shrink: 0;
}
.page-back-btn:active { background: var(--md-surface-variant); }

.page-title-text {
  flex: 1; min-width: 0;
}
.page-title-text h1 {
  margin: 0;
  font-size: var(--typescale-title-medium);
  font-weight: var(--weight-bold);
  color: var(--md-on-surface);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* --- 0.1 Card Component --- */
.xos-card {
  background: var(--md-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  contain: layout style paint;
}
.xos-card-outlined {
  border: 1px solid var(--md-outline);
  box-shadow: var(--elevation-1);
}
.xos-card-content {
  padding: var(--spacing-card-padding);
}
.xos-card-content-compact {
  padding: var(--space-6);
}
.xos-card-title {
  margin: 0 0 var(--space-4) 0;
  font-size: var(--typescale-title-medium);
  font-weight: var(--weight-bold);
  color: var(--md-on-surface);
}

/* --- 0.2 Avatar Component --- */
.xos-avatar {
  width: 40px; height: 40px;
  border-radius: var(--radius-full);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: var(--md-surface-variant);
  color: var(--md-on-surface-variant);
  font-size: var(--typescale-body-small);
  font-weight: var(--weight-bold);
  flex-shrink: 0;
}
.xos-avatar img {
  width: 100%; height: 100%; object-fit: cover;
}
.xos-avatar-md {
  width: 44px; height: 44px; min-width: 44px;
}

/* --- 0.3 Badge Components --- */
.xos-badge-listing-type {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: var(--typescale-label-small);
  font-weight: var(--weight-semibold);
  line-height: 1.6;
  white-space: nowrap;
}
.xos-badge-type-passenger_request { background: #dbeafe; color: #1e40af; }
.xos-badge-type-cargo_request     { background: #fef3c7; color: #92400e; }
.xos-badge-type-ride_offer        { background: #d1fae5; color: #065f46; }
.xos-badge-type-cargo_offer       { background: #f3e8ff; color: #6b21a8; }

.xos-badge-status {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: var(--typescale-label-small);
  font-weight: var(--weight-semibold);
  line-height: 1.6;
  white-space: nowrap;
}
.xos-badge-status-active    { background: #d1fae5; color: #065f46; }
.xos-badge-status-completed  { background: #dbeafe; color: #1e40af; }
.xos-badge-status-expired   { background: #fef3c7; color: #92400e; }
.xos-badge-status-draft     { background: #f3f4f6; color: #6b7280; }

/* --- 0.4 Button Component --- */
.xos-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  height: var(--btn-height);
  padding: 0 var(--space-8);
  border: none;
  border-radius: var(--btn-radius);
  font-size: var(--typescale-label-large);
  font-weight: var(--btn-font-weight);
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--motion-hover), opacity var(--motion-hover);
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
  min-height: var(--touch-target-sm);
  will-change: transform, opacity;
}
.xos-btn-filled {
  background: var(--md-primary);
  color: var(--md-primary-on);
}
.xos-btn-filled:hover { opacity: 0.92; transform: scale(1.02); }
.xos-btn-filled:active { transform: scale(0.97); opacity: 0.85; }
.xos-btn-outlined {
  background: transparent;
  color: var(--md-primary);
  border: 2px solid var(--md-primary);
}
.xos-btn-outlined:active { transform: scale(0.97); opacity: 0.85; }
.xos-btn-full { width: 100%; }

/* --- 0.5 Empty State --- */
.xos-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-16) var(--space-10);
  text-align: center;
}
.xos-empty-state .empty-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-6);
}
.xos-empty-state h3 {
  margin: 0 0 var(--space-3);
  font-size: var(--typescale-headline-small);
  color: var(--md-on-surface);
}
.xos-empty-state p {
  margin: 0 0 var(--space-8);
  font-size: var(--typescale-body-medium);
  color: var(--md-on-surface-variant);
}

/* --- 0.6 Skeleton --- */
.xos-skeleton {
  background: var(--skeleton-bg, #e5e7eb);
  border-radius: var(--skeleton-radius);
  position: relative;
  overflow: hidden;
}
.xos-skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--skeleton-shimmer);
  animation: xos-shimmer 1.2s infinite;
}
.xos-skeleton-text {
  height: 14px;
  margin-bottom: var(--space-3);
}
.xos-skeleton-text-sm {
  height: 10px;
  margin-bottom: var(--space-2);
}
.xos-skeleton-text-lg {
  height: 20px;
  margin-bottom: var(--space-4);
}
.xos-skeleton-card {
  height: 160px;
}

/* --- 0.7 Utility --- */
.text-muted {
  color: var(--md-on-surface-variant);
}

/* --- 0.8 Snackbar Container --- */
.xos-snackbar-container {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-snackbar, 700);
  max-width: 400px;
  width: calc(100% - 32px);
  contain: layout style paint;
}
#xos-snackbar {
  background: var(--snackbar-bg);
  color: var(--snackbar-color);
  padding: var(--snackbar-padding);
  border-radius: var(--snackbar-radius);
  box-shadow: var(--snackbar-elevation);
  font-size: var(--typescale-body-small);
  text-align: center;
  opacity: 0;
  transition: opacity var(--motion-duration-normal) var(--motion-easing-standard);
}
#xos-snackbar.active { opacity: 1; }

.xos-snackbar-error {
  background: var(--md-error, #ef4444);
  color: white;
}

.xos-snackbar-success {
  background: var(--state-success, #10b981);
  color: white;
}

.xos-snackbar-warning {
  background: var(--state-warning, #f59e0b);
  color: white;
}

#xos-snackbar.xos-snackbar-error {
  background: var(--md-error, #ef4444);
  color: white;
}

#xos-snackbar.xos-snackbar-success {
  background: var(--state-success, #10b981);
  color: white;
}

#xos-snackbar.xos-snackbar-warning {
  background: var(--state-warning, #f59e0b);
  color: white;
}

/* FAB styles & animation */
.fab-icon {
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
}

.xos-fab {
  position: fixed;
  bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  right: var(--space-8, 20px);
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--md-primary, #2563eb);
  color: var(--md-primary-on, white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
  cursor: pointer;
  z-index: var(--z-fab, 600);
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--motion-hover, 0.15s), opacity var(--motion-hover, 0.15s);
  border: none;
  outline: none;
  text-decoration: none;
  will-change: transform, opacity;
  contain: layout;
}

.xos-fab:active {
  transform: scale(0.92);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.xos-fab-enter {
  animation: xos-fab-enter 0.3s cubic-bezier(0.2, 0, 0, 1) both;
}

@keyframes xos-fab-enter {
  from { transform: translateY(80px) scale(0.6); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

/* Quick Action Skeleton variant */
.hp-quick-action-skeleton {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2, 4px);
  padding: var(--space-4, 12px);
}

.hp-service-card-skeleton {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2, 4px);
  padding: var(--space-6, 16px);
  background: var(--md-surface, white);
  border-radius: var(--radius-md, 12px);
}

/* --- 0.9 Form Field (MD3) --- */
.xos-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-3, 6px);
  margin-bottom: var(--space-8, 16px);
  position: relative;
  contain: layout style paint;
}

.xos-field-label {
  display: block;
  font-size: var(--typescale-body-medium, 14px);
  font-weight: var(--weight-semibold, 600);
  color: var(--md-on-surface, #1f2937);
  line-height: var(--leading-normal);
}

.xos-field-helper {
  font-size: var(--typescale-body-small, 12px);
  color: var(--md-on-surface-variant, #6b7280);
  line-height: var(--leading-normal);
  margin-top: 0;
}

/* Text Input, Select, Textarea MD3 */
.xos-input,
.xos-select {
  width: 100%;
  height: 48px;
  padding: 0 var(--space-8, 16px);
  border: 1.5px solid var(--md-outline, #e5e7eb);
  border-radius: var(--radius-sm, 8px);
  font-size: var(--typescale-body-large, 16px);
  font-family: var(--font-sans);
  color: var(--md-on-surface, #1f2937);
  background: var(--md-surface, #ffffff);
  outline: none;
  box-sizing: border-box;
  transition: border-color var(--motion-focus, 0.15s), box-shadow var(--motion-focus, 0.15s);
  -webkit-appearance: none;
  appearance: none;
}

.xos-input::placeholder,
.xos-select::placeholder {
  color: var(--md-on-surface-dim, #9ca3af);
}

.xos-input:focus,
.xos-select:focus {
  border-color: var(--md-outline-focus, #2563eb);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.xos-input:disabled,
.xos-select:disabled {
  background: var(--md-surface-variant, #f3f4f6);
  color: var(--md-on-surface-dim, #9ca3af);
  cursor: not-allowed;
}

/* Select arrow */
.xos-select {
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* Textarea variant */
textarea.xos-input {
  height: auto;
  min-height: 80px;
  padding: var(--space-6, 12px) var(--space-8, 16px);
  resize: vertical;
}

/* Validation States */
.xos-input-error {
  border-color: var(--md-error, #ef4444) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.xos-input-success {
  border-color: var(--state-success, #10b981) !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

.xos-field-error {
  font-size: var(--typescale-body-small, 12px);
  color: var(--md-error, #ef4444);
  line-height: var(--leading-normal);
  display: flex;
  align-items: center;
  gap: var(--space-2, 4px);
}

.xos-field-error::before {
  content: '';
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23ef4444' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='8' x2='12' y2='12'/%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'/%3E%3C/svg%3E") no-repeat center;
}

.xos-field-success {
  font-size: var(--typescale-body-small, 12px);
  color: var(--state-success, #10b981);
  line-height: var(--leading-normal);
  display: flex;
  align-items: center;
  gap: var(--space-2, 4px);
}

.xos-field-success::before {
  content: '';
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='8 12 11 15 16 9'/%3E%3C/svg%3E") no-repeat center;
}

/* Checkbox MD3 */
.xos-field-checkbox {
  margin-bottom: var(--space-8, 16px);
}

.xos-checkbox {
  display: flex;
  align-items: center;
  gap: var(--space-4, 8px);
  cursor: pointer;
  font-size: var(--typescale-body-medium, 14px);
  color: var(--md-on-surface, #1f2937);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.xos-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.xos-checkbox-mark {
  width: 20px;
  height: 20px;
  border: 2px solid var(--md-outline, #d1d5db);
  border-radius: var(--radius-xs, 4px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--motion-focus, 0.15s), border-color var(--motion-focus, 0.15s);
}

.xos-checkbox input[type="checkbox"]:checked + .xos-checkbox-mark {
  background: var(--md-primary, #2563eb);
  border-color: var(--md-primary, #2563eb);
}

.xos-checkbox input[type="checkbox"]:checked + .xos-checkbox-mark::after {
  content: '';
  width: 10px;
  height: 10px;
  background: url("data:image/svg+xml,%3Csvg width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpolyline points='4 12 9 17 20 6'/%3E%3C/svg%3E") no-repeat center;
}

.xos-checkbox input[type="checkbox"]:focus-visible + .xos-checkbox-mark {
  outline: 2px solid var(--md-primary, #2563eb);
  outline-offset: 2px;
}

/* --- 0.10 Ripple Effect (MD3) --- */
.xos-ripple {
  position: absolute;
  border-radius: 50%;
  background: var(--touch-ripple-color, rgba(37, 99, 235, 0.12));
  transform: scale(0);
  animation: xos-ripple-anim var(--motion-ripple, 0.2s) ease-out forwards;
  pointer-events: none;
  z-index: 0;
  will-change: transform, opacity;
}

/* Ensure ripple container has position relative */
[data-ripple] {
  position: relative;
  overflow: hidden;
}

/* --- 0.11 Loading Overlay --- */
.xos-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-loading, 900);
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: xos-fade-in var(--motion-duration-normal, 0.2s) var(--motion-easing-decelerate) both;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  contain: layout style paint;
}

.xos-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--md-outline, #e5e7eb);
  border-top-color: var(--md-primary, #2563eb);
  border-radius: 50%;
  animation: xos-spin 0.7s linear infinite;
}

/* --- 0.12 Motion Utility Classes --- */
.xos-fade-in {
  animation: xos-fade-in var(--motion-fade, 0.2s) var(--motion-easing-decelerate) both;
}

.xos-fade-out {
  animation: xos-fade-out var(--motion-duration-fast, 0.1s) var(--motion-easing-accelerate) both;
}

@keyframes xos-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes xos-fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes xos-scale-in {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes xos-ripple-anim {
  to { transform: scale(2.5); opacity: 0; }
}

@keyframes xos-shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes xos-spin {
  to { transform: rotate(360deg); }
}

@keyframes xos-slide-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.xos-scale-in {
  animation: xos-scale-in var(--motion-scale, 0.2s) var(--motion-easing-standard) both;
}

.xos-slide-up {
  animation: xos-slide-up var(--motion-duration-slow, 0.3s) var(--motion-easing-emphasized) both;
}

/* Stagger animation helper */
.xos-stagger > * {
  opacity: 0;
}

/* --- 0.13 Enhanced Empty State with Motion --- */
.xos-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-16, 48px) var(--space-10, 24px);
  text-align: center;
  animation: xos-fade-in var(--motion-fade, 0.2s) var(--motion-easing-decelerate) both;
}

.xos-empty-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-6, 12px);
  line-height: 1;
}

.xos-empty h3 {
  margin: 0 0 var(--space-3, 6px);
  font-size: var(--typescale-headline-small, 18px);
  font-weight: var(--weight-bold, 700);
  color: var(--md-on-surface, #1f2937);
}

.xos-empty p {
  margin: 0 0 var(--space-8, 16px);
  font-size: var(--typescale-body-medium, 14px);
  color: var(--md-on-surface-variant, #6b7280);
  max-width: 280px;
  line-height: var(--leading-normal);
}

.xos-empty-card {
  background: var(--md-surface, #ffffff);
  border-radius: var(--radius-md, 12px);
  border: 1px solid var(--md-outline, #e5e7eb);
  box-shadow: var(--elevation-2, 0 1px 3px rgba(0,0,0,0.08));
  contain: layout style paint;
}

/* --- 0.14 Enhanced Skeleton with Animation --- */
.xos-skeleton-area {
  padding: var(--space-4, 8px) 0;
  animation: xos-fade-in 0.2s ease-out;
}

.xos-skeleton-row {
  display: flex;
  gap: var(--space-4, 8px);
  align-items: center;
  margin-bottom: var(--space-6, 12px);
}

.xos-skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full, 50%);
  background: var(--skeleton-bg, #e5e7eb);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.xos-skeleton-avatar::after,
.xos-skeleton-text::after,
.xos-skeleton-card::after,
.xos-skeleton-text-sm::after,
.xos-skeleton-text-lg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--skeleton-shimmer);
  animation: xos-shimmer 1.2s infinite;
}

.xos-skeleton-text,
.xos-skeleton-text-sm,
.xos-skeleton-text-lg {
  position: relative;
  overflow: hidden;
}

/* Progress Bar (Indeterminate) */
.xos-progress {
  height: 4px;
  background: var(--md-outline, #e5e7eb);
  border-radius: var(--radius-full, 999px);
  overflow: hidden;
  position: relative;
}

.xos-progress-fill {
  height: 100%;
  background: var(--md-primary, #2563eb);
  border-radius: var(--radius-full, 999px);
  transition: width var(--motion-duration-normal, 0.2s) var(--motion-easing-standard);
  min-width: 4px;
}

.xos-progress-indeterminate .xos-progress-fill {
  width: 30% !important;
  animation: xos-progress-indeterminate 1.5s ease-in-out infinite;
}

@keyframes xos-progress-indeterminate {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(400%); }
}

/* --- 0.9 Search Overlay (Sprint 6B) --- */
.xos-search-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: var(--z-backdrop, 400);
  opacity: 0; pointer-events: none;
  transition: opacity var(--motion-duration-normal) var(--motion-easing-standard);
  contain: layout style paint;
}
.xos-search-overlay.open,
.xos-search-overlay.active { opacity: 1; pointer-events: auto; }

.xos-search-full {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: var(--z-modal, 1000);
  background: var(--md-surface);
  display: none;
  flex-direction: column;
  contain: layout style paint;
}
.xos-search-full.open,
.xos-search-full.active { display: flex; }

.xos-search-top {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--spacing-page);
  border-bottom: 1px solid var(--md-outline);
}
.xos-search-back {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border: none; background: transparent; cursor: pointer; border-radius: var(--radius-full);
  color: var(--md-on-surface);
}
.xos-search-input-wrap {
  flex: 1;
  display: flex; align-items: center;
  background: var(--md-surface-variant);
  border-radius: var(--radius-full);
  padding: 0 var(--space-4);
}
.xos-search-input {
  flex: 1; height: 42px;
  border: none; background: transparent;
  font-size: var(--typescale-body-medium);
  outline: none;
}
.xos-search-clear {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border: none; background: transparent; cursor: pointer;
  color: var(--md-on-surface-variant);
}

.xos-search-suggestions {
  padding: var(--space-4) var(--spacing-page);
  overflow-y: auto; flex: 1;
}
.xos-search-results {
  padding: var(--space-4) var(--spacing-page);
  overflow-y: auto; flex: 1;
}
.xos-results-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--space-4);
}
.xos-results-count { font-size: var(--typescale-body-small); color: var(--md-on-surface-variant); }
.xos-filter-btn {
  display: flex; align-items: center; gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--md-outline);
  border-radius: var(--radius-full);
  background: var(--md-surface);
  font-size: var(--typescale-label-small);
  font-weight: var(--weight-semibold);
  cursor: pointer;
}
.xos-active-filters { margin-bottom: var(--space-4); }

/* --- 0.10 Bottom Sheet --- */
.xos-bottom-sheet-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: var(--z-bottomsheet, 500);
  display: none;
  align-items: flex-end;
  justify-content: center;
  contain: layout style paint;
}
.xos-bottom-sheet-backdrop.open,
.xos-bottom-sheet-backdrop.active { display: flex; }

.xos-bottom-sheet {
  width: 100%; max-width: 500px;
  background: var(--md-surface);
  border-radius: var(--bottomsheet-radius);
  padding: var(--bottomsheet-padding);
  max-height: 80vh;
  overflow-y: auto;
  contain: layout style paint;
}
.xos-bottom-sheet-handle {
  width: 32px; height: var(--bottomsheet-handle);
  background: var(--md-outline-variant);
  border-radius: var(--radius-full);
  margin: 0 auto var(--space-6);
}
.xos-bottom-sheet-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--space-6);
}
.xos-bottom-sheet-header h3 { margin: 0; font-size: var(--typescale-title-medium); }
.bs-close {
  width: 40px; height: 40px;
  border: none; background: transparent;
  font-size: 24px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--md-on-surface-variant);
}
.xos-bottom-sheet-content { margin-bottom: var(--space-6); }
.xos-bottom-sheet-actions {
  display: flex; gap: var(--space-3);
}

/* --- 0.11 Filter Sheet --- */
.xos-filter-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: var(--z-bottomsheet, 500);
  display: none;
  contain: layout style paint;
}
.xos-filter-backdrop.open,
.xos-filter-backdrop.active { display: block; }

.xos-filter-sheet {
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: calc(var(--z-bottomsheet, 500) + 1);
  background: var(--md-surface);
  border-radius: var(--bottomsheet-radius);
  padding: var(--bottomsheet-padding);
  max-height: 80vh; overflow-y: auto;
  display: none;
  contain: layout style paint;
}
.xos-filter-sheet.open,
.xos-filter-sheet.active { display: block; }

.xos-filter-sheet-handle {
  width: 32px; height: var(--bottomsheet-handle);
  background: var(--md-outline-variant);
  border-radius: var(--radius-full);
  margin: 0 auto var(--space-6);
}
.xos-filter-sheet-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--space-6);
}
.xos-filter-sheet-header h3 { margin: 0; font-size: var(--typescale-title-medium); }
#xosFilterClose {
  width: 40px; height: 40px;
  border: none; background: transparent;
  font-size: 24px; cursor: pointer;
}
.xos-filter-group { margin-bottom: var(--space-6); }
.xos-filter-label {
  display: block; font-size: var(--typescale-label-medium);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-3);
}
.xos-filter-select {
  width: 100%;
  padding: 10px var(--space-4);
  border: 1.5px solid var(--md-outline);
  border-radius: var(--radius-sm);
  font-size: var(--typescale-body-medium);
  background: var(--md-surface);
  box-sizing: border-box;
}
.xos-filter-actions {
  display: flex; gap: var(--space-3);
}
.xos-filter-actions .xos-btn { flex: 1; }

/* ===========================================================
   36. DETAIL PAGE COMPONENTS — App Screen (Sprint 06B1)
   =========================================================== */

/* Detail page - inside page-content (spacer provides clearance, outer main has 60px padding) */
.xos-detail-page {
  padding-bottom: 0;
}

/* Detail Header row — badges row */
.xos-detail-header-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-3);
}

/* Compact route display (RouteSummaryCard) */
.xos-detail-route-compact {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--md-primary);
  padding: var(--space-1) 0 var(--space-3);
}

.xos-detail-route-compact svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.xos-detail-route-text {
  font-size: var(--typescale-body-medium);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-normal);
}

/* Info grid compact — route summary meta boxes */
.xos-detail-info-grid-compact {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.xos-detail-meta-box {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--md-surface-container-high);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  min-width: 60px;
}

.xos-detail-meta-box-label {
  font-size: var(--typescale-label-small, 10px);
  color: var(--md-on-surface-variant);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.xos-detail-meta-box-value {
  font-size: var(--typescale-label-medium, 12px);
  font-weight: var(--weight-semibold);
  color: var(--md-on-surface);
}

.xos-detail-meta-box-price .xos-detail-price-value {
  color: var(--md-tertiary);
  font-weight: var(--weight-bold);
}

/* Section spacing — reduced */
.xos-detail-section {
  margin-bottom: var(--space-4);
  contain: layout style paint;
}

/* Location component — route with dots */
.xos-detail-route {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.xos-detail-route-from,
.xos-detail-route-to {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.xos-detail-route-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
  margin-top: 4px;
}

.xos-detail-route-dot-origin {
  background: var(--md-primary);
  border: 2px solid var(--md-primary-container);
}

.xos-detail-route-dot-dest {
  background: var(--md-error);
  border: 2px solid var(--md-error-container);
}

.xos-detail-route-line {
  width: 2px;
  height: 20px;
  background: var(--md-outline);
  margin-left: 4px;
}

.xos-detail-route-label {
  display: block;
  font-size: var(--typescale-label-small);
  color: var(--md-on-surface-variant);
  margin-bottom: 0;
}

.xos-detail-route-value {
  font-size: var(--typescale-body-medium);
  font-weight: var(--weight-semibold);
  color: var(--md-on-surface);
}

/* Detail info grid — meta details */
.xos-detail-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

@media (min-width: 480px) {
  .xos-detail-info-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 768px) {
  .xos-detail-info-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.xos-detail-meta-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-3);
  background: var(--md-surface-container-high);
  border-radius: var(--radius-sm);
}

.xos-detail-meta-label {
  font-size: var(--typescale-label-small);
  color: var(--md-on-surface-variant);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

.xos-detail-meta-value {
  font-size: var(--typescale-label-medium);
  font-weight: var(--weight-semibold);
  color: var(--md-on-surface);
}

/* Gallery */
.xos-detail-gallery {
  display: flex;
  gap: var(--space-3);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-1);
  scrollbar-width: none;
  contain: layout style paint;
}

.xos-detail-gallery::-webkit-scrollbar {
  display: none;
}

.xos-detail-gallery-item {
  flex: 0 0 auto;
  scroll-snap-align: start;
  width: 100%;
  max-width: 400px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.xos-detail-gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-sm);
  object-fit: cover;
  max-height: 240px;
}

/* Driver Card — merged compact (Component 3) */
.xos-detail-driver-card {
  margin-bottom: var(--space-4);
}

.xos-detail-publisher-compact {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.xos-detail-publisher-info {
  flex: 1;
  min-width: 0;
}

.xos-detail-publisher-name {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: 1px;
}

.xos-detail-publisher-name strong {
  font-size: var(--typescale-body-medium);
  color: var(--md-on-surface);
}

.xos-detail-publisher-join {
  font-size: var(--typescale-label-small);
  color: var(--md-on-surface-variant);
  margin-top: 1px;
}

/* Verified Badge */
.xos-badge-verified {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #d1fae5;
  color: #065f46;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  font-size: var(--typescale-label-small, 10px);
  font-weight: var(--weight-semibold);
  white-space: nowrap;
}

/* Login Prompt */
.xos-detail-login-prompt {
  border: 2px dashed var(--md-outline);
  background: var(--md-surface-container);
}

/* ===========================================================
   BOTTOM CONTACT BAR (Component 4 - Layer 2)
   Fixed at bottom:60px, z-index:990
   App-style equal-width buttons
   =========================================================== */
.xos-detail-bottom-contact-bar {
  position: fixed;
  bottom: 60px;
  left: 0;
  right: 0;
  z-index: 990;
  background: var(--md-surface);
  border-top: 1px solid var(--md-outline-variant);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
  padding: var(--space-2) var(--spacing-page);
  padding-bottom: calc(var(--space-2) + env(safe-area-inset-bottom, 0px));
  contain: layout style paint;
}

.xos-detail-contact-inner {
  display: flex;
  gap: var(--space-3);
  max-width: var(--container-desktop);
  margin: 0 auto;
}

/* App-style equal-width action buttons */
.xos-detail-action-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-2);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: var(--weight-semibold);
  font-size: var(--typescale-label-small, 11px);
  min-height: var(--touch-target-min);
  border: none;
  cursor: pointer;
  transition: opacity var(--motion-hover), transform var(--motion-hover);
  -webkit-tap-highlight-color: transparent;
  color: var(--md-on-surface);
  background: var(--md-surface-container-high);
  contain: layout style paint;
}

.xos-detail-action-btn svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* Contact label (phone/zalo number) */
.xos-contact-label {
  font-size: var(--typescale-label-small, 11px);
  font-weight: var(--weight-bold, 700);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Contact action label ("Gọi ngay", "Zalo", "Sao chép") */
.xos-contact-action-label {
  font-size: 9px;
  font-weight: var(--weight-medium, 500);
  opacity: 0.85;
  line-height: 1;
}

/* Copy to clipboard button */
.xos-detail-action-copy {
  background: var(--md-surface-container-high);
  color: var(--md-on-surface);
}

.xos-detail-action-btn:active {
  transform: scale(0.97);
  opacity: 0.85;
}

.xos-detail-action-call {
  background: var(--md-tertiary);
  color: var(--md-tertiary-on);
}

.xos-detail-action-zalo {
  background: #0068ff;
  color: white;
}

.xos-detail-action-chat {
  background: var(--md-primary-container);
  color: var(--md-on-primary-container);
}

.xos-detail-action-contact {
  background: var(--md-primary);
  color: var(--md-primary-on);
}

/* Description content */
.xos-detail-description {
  font-size: var(--typescale-body-small);
  line-height: var(--leading-relaxed);
  color: var(--md-on-surface);
}

.xos-detail-description p {
  margin: 0 0 var(--space-3);
}

.xos-detail-description p:last-child {
  margin-bottom: 0;
}

/* Responsive - Desktop shows sidebar layout */
@media (min-width: 768px) {
  .xos-detail-page {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: var(--space-8);
    padding-bottom: var(--space-10);
  }

  .xos-detail-bottom-spacer {
    display: none;
  }

  .xos-detail-bottom-contact-bar {
    display: none;
  }

  .xos-detail-login-prompt,
  .xos-detail-section:last-of-type {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1024px) {
  .xos-detail-page {
    grid-template-columns: 1fr 380px;
  }
}

/* --- 0.15 Skeleton List Item (Dashboard timeline) --- */
.xos-skeleton-list-item {
  display: flex;
  gap: var(--space-4, 12px);
  align-items: center;
  padding: var(--space-4, 12px) 0;
  border-bottom: 1px solid var(--md-outline-variant, #f3f4f6);
}

.xos-skeleton-list-item:last-child {
  border-bottom: none;
}

.xos-skeleton-list-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full, 50%);
  background: var(--skeleton-bg, #e5e7eb);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.xos-skeleton-list-avatar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--skeleton-shimmer);
  animation: xos-shimmer 1.2s infinite;
}

.xos-skeleton-list-content {
  flex: 1;
  min-width: 0;
}

.xos-skeleton-list-line {
  height: 14px;
  background: var(--skeleton-bg, #e5e7eb);
  border-radius: var(--radius-xs, 4px);
  margin-bottom: var(--space-2, 6px);
  position: relative;
  overflow: hidden;
}

.xos-skeleton-list-line-sm {
  width: 50%;
  height: 10px;
}

.xos-skeleton-list-line::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--skeleton-shimmer);
  animation: xos-shimmer 1.2s infinite;
}

/* --- 0.16 Compact Listing Card (Homepage, Search) --- */
.xos-card-compact {
  display: flex;
  flex-direction: column;
  background: var(--md-surface, #ffffff);
  border-radius: var(--radius-md, 12px);
  border: 1px solid var(--md-outline, #e5e7eb);
  overflow: hidden;
  contain: layout style paint;
  transition: transform var(--motion-hover, 0.15s), opacity var(--motion-hover, 0.15s);
  cursor: pointer;
}

.xos-card-compact:active {
  transform: scale(0.98);
}

.xos-card-compact-head {
  display: flex;
  align-items: center;
  gap: var(--space-3, 8px);
  padding: var(--space-4, 12px) var(--space-5, 16px);
}

.xos-card-compact-body {
  padding: 0 var(--space-5, 16px) var(--space-4, 12px);
}

.xos-card-compact-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3, 8px) var(--space-5, 16px);
  border-top: 1px solid var(--md-outline-variant, #f3f4f6);
}

/* --- 0.17 No Match / No Result Empty State --- */
.xos-no-match {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-16, 48px) var(--space-10, 24px);
  text-align: center;
  animation: xos-fade-in var(--motion-fade, 0.2s) var(--motion-easing-decelerate) both;
}

.xos-no-match-icon {
  font-size: 3rem;
  margin-bottom: var(--space-6, 12px);
  line-height: 1;
  opacity: 0.6;
}

.xos-no-match h3 {
  margin: 0 0 var(--space-3, 6px);
  font-size: var(--typescale-headline-small, 18px);
  font-weight: var(--weight-bold, 700);
  color: var(--md-on-surface, #1f2937);
}

.xos-no-match p {
  margin: 0 0 var(--space-8, 16px);
  font-size: var(--typescale-body-medium, 14px);
  color: var(--md-on-surface-variant, #6b7280);
  max-width: 280px;
  line-height: var(--leading-normal);
}

/* --- 0.18 Auth Form (Login / Register) --- */
.xos-auth-form {
  max-width: 400px;
  margin: var(--space-12, 32px) auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: xos-fade-in 0.25s var(--motion-easing-decelerate) both;
  contain: layout style paint;
}

.xos-auth-header {
  text-align: center;
  margin-bottom: var(--space-8, 24px);
}

.xos-auth-header svg {
  margin-bottom: var(--space-4, 8px);
}

.xos-auth-header h1 {
  margin: 0;
  font-size: var(--typescale-headline-medium, 24px);
  font-weight: var(--weight-bold, 700);
  color: var(--md-on-surface, #1f2937);
}

.xos-auth-footer {
  text-align: center;
  margin-top: var(--space-8, 24px);
  font-size: var(--typescale-body-medium, 14px);
  color: var(--md-on-surface-variant, #6b7280);
}

.xos-auth-footer a {
  color: var(--md-primary, #2563eb);
  font-weight: var(--weight-semibold, 600);
  text-decoration: none;
}

.xos-auth-footer a:active {
  text-decoration: underline;
}

.xos-styled-form {
  width: 100%;
}

/* --- 0.19 Wizard Form (Create Listing) --- */
.wizard-progress-wrapper {
  margin-bottom: var(--space-8, 24px);
}

.wizard-progress-bar {
  height: 6px;
  background: var(--md-outline, #e5e7eb);
  border-radius: var(--radius-full, 999px);
  overflow: hidden;
  margin-bottom: var(--space-3, 8px);
}

.wizard-progress-fill {
  height: 100%;
  background: var(--md-primary, #2563eb);
  border-radius: var(--radius-full, 999px);
  transition: width var(--motion-duration-normal, 0.2s) var(--motion-easing-standard);
}

.wizard-step-indicator {
  text-align: center;
  font-size: var(--typescale-body-small, 12px);
  color: var(--md-on-surface-variant, #6b7280);
}

.wizard-steps {
  display: flex;
  gap: var(--space-2, 4px);
  margin-bottom: var(--space-8, 24px);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1, 2px);
  flex: 1;
  min-width: 56px;
  opacity: 0.4;
  transition: opacity var(--motion-hover, 0.15s);
}

.wizard-step.active {
  opacity: 1;
}

.wizard-step.active .step-number {
  background: var(--md-primary, #2563eb);
  color: white;
}

.step-number {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full, 50%);
  background: var(--md-surface-variant, #f3f4f6);
  color: var(--md-on-surface-variant, #6b7280);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--typescale-label-small, 11px);
  font-weight: var(--weight-bold, 700);
  transition: background var(--motion-hover, 0.15s), color var(--motion-hover, 0.15s);
}

.step-label {
  font-size: var(--typescale-label-small, 10px);
  color: var(--md-on-surface-variant, #6b7280);
  text-align: center;
  white-space: nowrap;
}

/* Wizard Buttons */
.wizard-actions {
  display: flex;
  gap: var(--space-4, 12px);
  margin-top: var(--space-8, 24px);
  justify-content: space-between;
}

.btn-prev,
.btn-next,
.btn-publish {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2, 4px);
  height: var(--btn-height, 48px);
  padding: 0 var(--space-8, 20px);
  border: none;
  border-radius: var(--btn-radius, 12px);
  font-size: var(--typescale-label-large, 14px);
  font-weight: var(--btn-font-weight, 600);
  cursor: pointer;
  transition: background var(--motion-hover, 0.15s), opacity var(--motion-hover, 0.15s);
  -webkit-tap-highlight-color: transparent;
  min-height: var(--touch-target-min, 44px);
}

.btn-prev {
  background: var(--md-surface-variant, #f3f4f6);
  color: var(--md-on-surface, #1f2937);
  flex: 1;
}

.btn-prev:active {
  background: var(--md-outline, #e5e7eb);
}

.btn-next {
  background: var(--md-primary, #2563eb);
  color: var(--md-primary-on, white);
  flex: 1;
}

.btn-next:active {
  background: var(--md-primary-hover, #1d4ed8);
}

.btn-next:disabled {
  opacity: 0.4;
  cursor: default;
}

.btn-publish {
  background: var(--state-success, #10b981);
  color: white;
  flex: 1;
  font-size: var(--typescale-title-small, 16px);
}

.btn-publish:active {
  background: #059669;
}

/* Wizard Step Content */
.wizard-step-content {
  animation: xos-scale-in 0.25s var(--motion-easing-emphasized) both;
}

.wizard-step-content h3 {
  margin: 0 0 var(--space-2, 4px);
  font-size: var(--typescale-headline-small, 20px);
  font-weight: var(--weight-bold, 700);
  color: var(--md-on-surface, #1f2937);
}

.wizard-step-desc {
  margin: 0 0 var(--space-8, 20px);
  font-size: var(--typescale-body-medium, 14px);
  color: var(--md-on-surface-variant, #6b7280);
}

/* Wizard Form Inputs */
.wiz-input {
  width: 100%;
  height: 48px;
  padding: 0 var(--space-6, 14px);
  border: 1.5px solid var(--md-outline, #e5e7eb);
  border-radius: var(--radius-sm, 8px);
  font-size: var(--typescale-body-medium, 14px);
  font-family: var(--font-sans);
  color: var(--md-on-surface, #1f2937);
  background: var(--md-surface, white);
  outline: none;
  box-sizing: border-box;
  transition: border-color var(--motion-focus, 0.15s), box-shadow var(--motion-focus, 0.15s);
}

.wiz-input:focus {
  border-color: var(--md-outline-focus, #2563eb);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.wiz-input[readonly] {
  background: var(--md-surface-variant, #f3f4f6);
  color: var(--md-on-surface-dim, #9ca3af);
  cursor: default;
}

textarea.wiz-input {
  height: auto;
  min-height: 72px;
  padding: var(--space-4, 10px) var(--space-6, 14px);
  resize: vertical;
}

.form-group {
  margin-bottom: var(--space-6, 16px);
}

.form-group label {
  display: block;
  font-size: var(--typescale-body-medium, 14px);
  font-weight: var(--weight-semibold, 600);
  color: var(--md-on-surface, #1f2937);
  margin-bottom: var(--space-2, 6px);
}

.form-row {
  display: flex;
  gap: var(--space-4, 12px);
}

.form-row .form-group {
  flex: 1;
  min-width: 0;
}

.form-row-three {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4, 12px);
}

/* Listing Type Cards */
.listing-type-options {
  display: grid;
  gap: var(--space-4, 12px);
}

.listing-type-card {
  display: flex;
  align-items: center;
  gap: var(--space-4, 12px);
  padding: var(--space-5, 14px) var(--space-6, 18px);
  border: 2px solid var(--md-outline, #e5e7eb);
  border-radius: var(--radius-md, 12px);
  cursor: pointer;
  transition: border-color var(--motion-hover, 0.15s), background var(--motion-hover, 0.15s);
  -webkit-tap-highlight-color: transparent;
  background: var(--md-surface, white);
}

.listing-type-card:active {
  border-color: var(--md-primary, #2563eb);
  background: var(--md-primary-container, #dbeafe);
}

.listing-type-card.selected {
  border-color: var(--md-primary, #2563eb);
  background: var(--md-primary-container, #dbeafe);
}

.listing-type-card .type-icon {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
}

.type-text h4 {
  margin: 0 0 var(--space-1, 2px);
  font-size: var(--typescale-title-medium, 16px);
  font-weight: var(--weight-bold, 700);
  color: var(--md-on-surface, #1f2937);
}

.type-text p {
  margin: 0;
  font-size: var(--typescale-body-small, 12px);
  color: var(--md-on-surface-variant, #6b7280);
}

/* Wizard Spinner */
.wizard-spinner {
  display: flex;
  justify-content: center;
  padding: var(--space-16, 48px);
}

.spinner-icon {
  width: 36px;
  height: 36px;
  border: 3px solid var(--md-outline, #e5e7eb);
  border-top-color: var(--md-primary, #2563eb);
  border-radius: 50%;
  animation: xos-spin 0.7s linear infinite;
}

/* Preview Box */
.preview-box {
  background: var(--md-surface, white);
  border: 1px solid var(--md-outline, #e5e7eb);
  border-radius: var(--radius-md, 12px);
  padding: var(--space-6, 16px);
  min-height: 80px;
}

.preview-box .no-data {
  text-align: center;
  color: var(--md-on-surface-variant, #6b7280);
  margin: var(--space-8, 24px) 0;
}

/* Publish Summary */
.publish-summary {
  text-align: center;
  padding: var(--space-8, 24px);
  background: var(--md-surface, white);
  border-radius: var(--radius-md, 12px);
  border: 1px solid var(--md-outline, #e5e7eb);
}

.publish-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-4, 12px);
}

.publish-summary h4 {
  margin: 0 0 var(--space-3, 8px);
  font-size: var(--typescale-headline-small, 20px);
  font-weight: var(--weight-bold, 700);
  color: var(--md-on-surface, #1f2937);
}

.publish-summary p {
  margin: 0 0 var(--space-4, 12px);
  font-size: var(--typescale-body-medium, 14px);
  color: var(--md-on-surface-variant, #6b7280);
}

.publish-limit {
  font-size: var(--typescale-body-small, 12px);
  color: var(--md-primary, #2563eb);
  font-weight: var(--weight-semibold, 600);
}

/* Wiz Suggestions (autocomplete dropdown) */
.wiz-suggestions {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: var(--z-dropdown, 300);
  background: var(--md-surface, white);
  border: 1px solid var(--md-outline, #e5e7eb);
  border-radius: var(--radius-sm, 8px);
  max-height: 200px;
  overflow-y: auto;
  box-shadow: var(--elevation-3, 0 4px 12px rgba(0,0,0,0.1));
}

.wiz-suggestions.active {
  display: block;
}

/* Map Preview */
.wiz-map-preview {
  background: var(--md-surface-variant, #f3f4f6);
  border: 1px solid var(--md-outline, #e5e7eb);
  border-radius: var(--radius-sm, 8px);
  padding: var(--space-8, 24px);
  text-align: center;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-placeholder {
  margin: 0;
  font-size: var(--typescale-body-medium, 14px);
  color: var(--md-on-surface-variant, #6b7280);
}

/* --- 0.20 Homepage Empty State --- */
.hp-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-12, 36px) var(--space-8, 20px);
  text-align: center;
  animation: xos-fade-in 0.25s var(--motion-easing-decelerate) both;
}

.hp-empty-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-4, 10px);
  line-height: 1;
  opacity: 0.6;
}

.hp-empty p {
  margin: 0;
  font-size: var(--typescale-body-medium, 14px);
  color: var(--md-on-surface-variant, #6b7280);
}

/* ===========================================================
    COMPANY LOGO UPLOAD (Sprint 11C.3 Module 2)
   =========================================================== */
.xos-logo-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3, 12px);
  padding: var(--space-4, 16px);
  background: var(--md-surface, #fff);
  border: 1px solid var(--md-outline, #e0e0e0);
  border-radius: var(--radius-lg, 12px);
}

.xos-logo-preview-container {
  width: 150px;
  height: 150px;
  border-radius: var(--radius-full, 50%);
  overflow: hidden;
  border: 2px dashed var(--md-outline, #e0e0e0);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--md-surface-variant, #f5f5f5);
  position: relative;
}

.xos-logo-preview-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.xos-logo-preview-container img[src]:not([src=""]) {
  display: block;
}

.xos-logo-placeholder {
  color: var(--md-on-surface-variant, #9e9e9e);
  font-size: var(--typescale-body-small, 12px);
  text-align: center;
  padding: var(--space-2, 8px);
}

.xos-logo-actions {
  display: flex;
  gap: var(--space-2, 8px);
  flex-wrap: wrap;
  justify-content: center;
}

.xos-logo-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1, 4px);
  padding: 8px 16px;
  border: 1px solid var(--md-outline, #e0e0e0);
  border-radius: var(--radius-md, 8px);
  background: var(--md-surface, #fff);
  color: var(--md-on-surface, #1a1a1a);
  font-size: var(--typescale-body-medium, 14px);
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  line-height: 1.4;
  font-weight: 500;
}

.xos-logo-btn:active {
  background: var(--md-surface-variant, #e8e8e8);
}

.xos-logo-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.xos-logo-btn-primary {
  background: var(--md-primary, #1a73e8);
  color: var(--md-on-primary, #fff);
  border-color: var(--md-primary, #1a73e8);
}

.xos-logo-btn-primary:active {
  background: var(--md-primary-variant, #1557b0);
}

.xos-logo-btn-danger {
  color: var(--md-error, #d32f2f);
  border-color: var(--md-error, #d32f2f);
}

.xos-logo-btn-danger:active {
  background: rgba(211, 47, 47, 0.08);
}

.xos-logo-btn-hidden {
  display: none;
}

.xos-logo-status {
  display: none;
  padding: 8px 12px;
  border-radius: var(--radius-md, 8px);
  font-size: var(--typescale-body-small, 12px);
  text-align: center;
  width: 100%;
}

.xos-logo-status.success {
  display: block;
  background: rgba(76, 175, 80, 0.1);
  color: var(--md-tertiary, #2e7d32);
}

.xos-logo-status.error {
  display: block;
  background: rgba(211, 47, 47, 0.1);
  color: var(--md-error, #d32f2f);
}

.xos-logo-status.info {
  display: block;
  background: rgba(26, 115, 232, 0.1);
  color: var(--md-primary, #1a73e8);
}

.xos-logo-info {
  font-size: var(--typescale-body-small, 12px);
  color: var(--md-on-surface-variant, #9e9e9e);
  text-align: center;
}

/* Hidden file input */
.xos-logo-file-input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Dashboard variant - smaller logo */
.dashboard .xos-logo-preview-container {
  width: 80px;
  height: 80px;
}

.dashboard .xos-logo-section {
  padding: var(--space-2, 8px);
  border: none;
  background: transparent;
}

/* Responsive */
@media (max-width: 480px) {
  .xos-logo-preview-container {
    width: 120px;
    height: 120px;
  }
  
  .xos-logo-btn {
    font-size: var(--typescale-body-small, 12px);
    padding: 6px 12px;
  }
}

/* === END OF COMPONENTS === */


