/* ============================================================================
   ChapChap Platform - App Styles
   Only truly custom non-Bootstrap/non-design-system styles.
   Uses design-system.css variables.
   ============================================================================ */

/* ── Layout helpers ── */
.page-wrapper { min-height: 100vh; display: flex; flex-direction: column; }
.page-wrapper > .container { flex: 1; }

/* ── Section spacing ── */
.section-chap { padding: 48px 0; }
.section-chap-sm { padding: 24px 0; }

/* ── Hover card animation ── */
.card-hover {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-hover:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

/* ── Truncate text ── */
.truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Price styling ── */
.price-chap {
  color: var(--color-primary);
  font-weight: 700;
  white-space: nowrap;
}

/* ── Verification badge ── */
.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--color-success);
  font-size: 12px;
  font-weight: 600;
}

/* ── Rating stars ── */
.stars {
  display: inline-flex;
  gap: 2px;
  color: #eab308;
  font-size: 14px;
}

/* ── Delivery time chip ── */
.time-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: var(--color-primary-bg);
  color: var(--color-primary);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

/* ── Distance text ── */
.distance-text {
  color: var(--color-text-secondary);
  font-size: 12px;
}

/* ── Responsive table with card fallback ── */
@media (max-width: 576px) {
  .table-responsive-card thead { display: none; }
  .table-responsive-card tr {
    display: block;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 8px;
  }
  .table-responsive-card td {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border: none;
    font-size: 13px;
  }
  .table-responsive-card td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--color-text-secondary);
  }
}

/* ── Loading spinner overlay ── */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* ── Button with icon ── */
.btn-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ── Orange dot (online indicator) ── */
.dot-online {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 0 2px var(--color-success-bg);
}

/* ── Order badge pulse animation ── */
@keyframes badge-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}
.order-badge-pulse {
  animation: badge-pulse 2s ease-in-out infinite;
}

/* ── Notification indicator ── */
.notification-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 107, 0, 0.1);
  color: var(--color-primary, #FF6B00);
  border: 1px solid rgba(255, 107, 0, 0.2);
  transition: all 0.2s ease;
}
.notification-indicator:hover {
  background: rgba(255, 107, 0, 0.15);
  border-color: rgba(255, 107, 0, 0.4);
}
.notification-indicator.has-orders {
  background: rgba(255, 107, 0, 0.15);
  border-color: var(--color-primary, #FF6B00);
}
.notification-indicator .indicator-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-primary, #FF6B00);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.5); }
}
