/* ============================================================
   PAKHANJURE ONE - Components Stylesheet
   ============================================================
   Buttons, Inputs, Cards, Modals, Toast, Chips
   ============================================================ */
.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
  display: block;
  overflow: hidden;
  clip-path: circle(50%);
}

.brand-badge {
  background: #ffffff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: var(--shadow-md);
}

.brand-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  clip-path: circle(50%);
  display: block;
}


/* ============================================================
   1. BUTTONS
   ============================================================ */

/* ============================================================
   1. BUTTONS (with Tap Highlight Fix)
   ============================================================ */

/* Primary Button (Orange) */
.btn-pill,
.btn-solid-orange {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 15px 20px;
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
  border-radius: var(--radius-pill);
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform var(--transition-fast), opacity var(--transition-fast), background-color var(--transition-fast);
  background: var(--brand-orange);
  color: #ffffff;
  box-shadow: var(--shadow-brand);
  text-align: center;

  /* Tap highlight fix */
  -webkit-tap-highlight-color: transparent !important;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
  outline: none !important;
}

.btn-pill:focus,
.btn-solid-orange:focus {
  outline: none !important;
  box-shadow: var(--shadow-brand);
}

.btn-pill:active,
.btn-solid-orange:active {
  transform: scale(0.98);
  opacity: 0.9;
  background: var(--brand-orange-hover);
  -webkit-tap-highlight-color: transparent !important;
}

.btn-pill:disabled,
.btn-solid-orange:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Dark Button */
.btn-dark {
  background: rgba(15, 23, 42, 0.75);
  color: var(--text-primary);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: none;

  /* Tap highlight fix */
  -webkit-tap-highlight-color: transparent !important;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
  outline: none !important;
}

.btn-dark:focus {
  outline: none !important;
  box-shadow: none !important;
}

.btn-dark:active {
  -webkit-tap-highlight-color: transparent !important;
  background: rgba(15, 23, 42, 0.9);
}

/* Outline Button */
.btn-outline-pill,
.btn-outline-navy {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1.5px solid var(--border-light);
  color: var(--text-primary);
  padding: 14px 20px;
  border-radius: var(--radius-pill);
  font-size: var(--text-md);
  font-weight: var(--fw-bold);
  cursor: pointer;
  width: 100%;
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
  text-align: center;

  /* Tap highlight fix */
  -webkit-tap-highlight-color: transparent !important;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
  outline: none !important;
}

.btn-outline-pill:focus,
.btn-outline-navy:focus {
  outline: none !important;
}

.btn-outline-pill:active,
.btn-outline-navy:active {
  background: var(--bg-input);
  border-color: var(--brand-orange);
  -webkit-tap-highlight-color: transparent !important;
}

/* Button with loading state */
.btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: p1-spin 0.7s linear infinite;
}

/* ============================================================
   GLOBAL TAP HIGHLIGHT FIX
   ============================================================ */
button,
a,
input,
textarea,
select,
.clickable {
  -webkit-tap-highlight-color: transparent !important;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;
}

button:focus,
a:focus {
  outline: none !important;
}
/* ============================================================
   2. INPUTS
   ============================================================ */

.input-group-row {
  margin-bottom: var(--space-lg);
  width: 100%;
}

.input-label-text {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  font-weight: var(--fw-extrabold);
  color: var(--text-muted);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-bottom: 7px;
}

.input-box-wrap {
  background: var(--bg-input);
  border: 1.5px solid transparent;
  border-radius: var(--radius-md);
  padding: 13px 15px;
  display: flex;
  align-items: center;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
  width: 100%;
}

.input-box-wrap:focus-within {
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 3px var(--brand-orange-light);
}

.input-box-wrap input,
.input-box-wrap textarea {
  background: transparent;
  border: none;
  outline: none;
  width: 100%;
  color: var(--text-primary);
  font-size: var(--text-md);
  font-weight: var(--fw-medium);
  font-family: inherit;
  resize: none;
}

.input-box-wrap input::placeholder,
.input-box-wrap textarea::placeholder {
  color: var(--text-placeholder);
}

.eye-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 15px;
  color: var(--text-muted);
  padding: 0;
  display: flex;
  align-items: center;
}

.forgot-link-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 2px;
  margin-bottom: var(--space-2xl);
}

.link-orange-text {
  color: var(--brand-orange);
  font-size: var(--text-base);
  font-weight: var(--fw-semibold);
  cursor: pointer;
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
}

/* Textarea input (full-width inside input wrapper) */
.input-box-wrap textarea {
  min-height: 60px;
}

/* ============================================================
   3. CARDS
   ============================================================ */

.card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
}

.card-elevated {
  background: var(--bg-card);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-lg);
}

/* Bill Summary Card */
.bill-summary-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bill-row {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-base);
  color: var(--text-muted);
}

.bill-row.total-row {
  border-top: 1px dashed var(--border-light);
  padding-top: 10px;
  margin-top: 4px;
  font-size: var(--text-lg);
  font-weight: var(--fw-extrabold);
  color: var(--text-primary);
}

/* ============================================================
   4. BADGES & TAGS
   ============================================================ */

.badge-tag {
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.badge-tag.partner {
  background: #312e81;
  color: #a5b4fc;
}

.badge-tag.rider {
  background: #14532d;
  color: #86efac;
}

.tag-badge {
  font-size: 11px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-weight: var(--fw-medium);
}

/* ============================================================
   5. CHIPS (Filter chips)
   ============================================================ */

.chip-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: var(--text-base);
  font-weight: var(--fw-semibold);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.chip-btn.active {
  background: #1e3a8a;
  border-color: var(--brand-blue);
  color: var(--text-primary);
}

.filter-chips-row {
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
}

.filter-chips-row::-webkit-scrollbar {
  display: none;
}

/* ============================================================
   6. NAVIGATION DOCK (Bottom Nav)
   ============================================================ */

.app-nav-dock {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;

  width: 100% !important;
  height: var(--nav-height);

  background: var(--bg-page);
  border-top: 1.5px solid var(--border-light);

  display: flex !important;
  justify-content: space-around;
  align-items: center;

  z-index: 99999 !important;

  box-sizing: border-box;

  padding-bottom: env(safe-area-inset-bottom, 0px);

  /* Android WebView/PWA rendering fix */
  transform: none !important;
  -webkit-transform: none !important;

  visibility: visible !important;
  opacity: 1 !important;
}

.dock-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-decoration: none;
  font-size: 11px;
  font-weight: var(--fw-bold);
  color: var(--text-muted);
  border: none;
  background: transparent;
  cursor: pointer;
  flex: 1;
  transition: color var(--transition-fast);
  position: relative;
  padding: 8px 0;
}

.dock-btn.active {
  color: var(--brand-orange);
}

.dock-icon {
  font-size: 18px;
}

.dock-badge {
  position: absolute;
  top: 4px;
  right: calc(50% - 16px);
  background: var(--brand-orange);
  color: #ffffff;
  font-size: 10px;
  font-weight: var(--fw-extrabold);
  border-radius: 50%;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================================
   7. MODALS
   ============================================================ */

.modal-backdrop,
.p1-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 17, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  padding: 20px;
}

.modal-backdrop.show,
.p1-modal-backdrop.show {
  opacity: 1;
  visibility: visible;
}

.master-popup-card,
.p1-modal {
  width: 100%;
  max-width: 340px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-light);
  border-radius: 22px;
  padding: 24px 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: var(--shadow-lg);
  transform: scale(0.9);
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-backdrop.show .master-popup-card,
.p1-modal-backdrop.show .p1-modal {
  transform: scale(1);
}

.popup-icon-badge,
.p1-modal-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 14px;
}

.popup-icon-badge.success,
.p1-modal-icon.success {
  background: var(--success-bg);
  border: 2px solid var(--success);
  color: var(--success);
}

.popup-icon-badge.error,
.p1-modal-icon.error {
  background: var(--danger-bg);
  border: 2px solid var(--danger);
  color: var(--danger);
}

.popup-icon-badge.warning,
.p1-modal-icon.warning {
  background: var(--warning-bg);
  border: 2px solid var(--warning);
  color: var(--warning);
}

.popup-title,
.p1-modal-title {
  font-size: var(--text-xl);
  font-weight: var(--fw-extrabold);
  color: var(--text-primary);
  margin-bottom: 6px;
}

.popup-message,
.p1-modal-message {
  font-size: var(--text-base);
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 20px;
}

.popup-btn-confirm,
.p1-modal-btn.confirm {
  width: 100%;
  background: var(--brand-orange);
  color: #ffffff;
  border: none;
  font-size: var(--text-md);
  font-weight: var(--fw-bold);
  padding: 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(255, 122, 0, 0.35);
  transition: transform var(--transition-fast);
}

.popup-btn-confirm:active,
.p1-modal-btn.confirm:active {
  transform: scale(0.97);
}

/* Bottom sheet modal */
.bottom-sheet {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 17, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: var(--z-modal);
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.bottom-sheet.show {
  display: flex;
}

.bottom-sheet-content {
  width: 100%;
  max-width: var(--app-max-width);
  background: var(--bg-page);
  border-radius: var(--radius-2xl, 24px) var(--radius-2xl, 24px) 0 0;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  border: 1.5px solid var(--border-light);
  border-bottom: none;
  animation: slide-up 0.3s ease;
}

@keyframes slide-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.bottom-sheet-header {
  padding: var(--space-xl);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bottom-sheet-title {
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
  color: var(--text-primary);
}

.bottom-sheet-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
}

.bottom-sheet-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-xl);
}

/* ============================================================
   8. TOAST
   ============================================================ */

.p1-toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: calc(100% - 32px);
  max-width: 380px;
  pointer-events: none;
}

.p1-toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: auto;
  opacity: 0;
  transform: translateY(-20px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  color: var(--text-primary);
  position: relative;
  overflow: hidden;
}

.p1-toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.p1-toast-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  font-weight: var(--fw-extrabold);
}

.p1-toast-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.p1-toast-title {
  font-size: var(--text-base);
  font-weight: var(--fw-bold);
  color: var(--text-primary);
}

.p1-toast-message {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.4;
  word-wrap: break-word;
}

.p1-toast.success { border-color: var(--success); }
.p1-toast.success .p1-toast-icon { background: var(--success-bg); color: var(--success); border: 1.5px solid var(--success); }

.p1-toast.error { border-color: var(--danger); }
.p1-toast.error .p1-toast-icon { background: var(--danger-bg); color: var(--danger); border: 1.5px solid var(--danger); }

.p1-toast.warning { border-color: var(--warning); }
.p1-toast.warning .p1-toast-icon { background: var(--warning-bg); color: var(--warning); border: 1.5px solid var(--warning); }

.p1-toast.info { border-color: var(--info); }
.p1-toast.info .p1-toast-icon { background: var(--info-bg); color: var(--info); border: 1.5px solid var(--info); }

/* ============================================================
   9. VEG / NON-VEG SYMBOLS
   ============================================================ */

.veg-symbol {
  width: 14px;
  height: 14px;
  border: 1.5px solid #16a34a;
  padding: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  flex-shrink: 0;
}

.veg-symbol::after {
  content: '';
  width: 6px;
  height: 6px;
  background: #16a34a;
  border-radius: 50%;
}

.veg-symbol.non-veg {
  border-color: #dc2626;
}

.veg-symbol.non-veg::after {
  background: #dc2626;
}

/* ============================================================
   10. AVATARS
   ============================================================ */

.user-initial-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e3a8a 0%, var(--brand-blue) 100%);
  border: 2px solid var(--brand-orange);
  color: #ffffff;
  font-size: 22px;
  font-weight: var(--fw-extrabold);
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  box-shadow: var(--shadow-md);
  flex-shrink: 0;
}

/* ============================================================
   11. RATING BADGES
   ============================================================ */

.rating-badge {
  color: var(--success);
  font-weight: var(--fw-extrabold);
}

.rating-badge-star {
  font-weight: var(--fw-bold);
  color: var(--brand-orange);
}

.rating-pill-bold {
  color: var(--brand-orange);
  font-weight: var(--fw-bold);
}

/* ============================================================
   12. QUANTITY STEPPER
   ============================================================ */

.qty-stepper {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  padding: 3px 8px;
  gap: 10px;
}

.btn-step {
  background: transparent;
  border: none;
  font-size: 15px;
  font-weight: var(--fw-bold);
  cursor: pointer;
  color: var(--text-primary);
  padding: 4px 8px;
  line-height: 1;
}

.qty-counter {
  font-size: var(--text-base);
  font-weight: var(--fw-bold);
  color: var(--brand-orange);
  min-width: 16px;
  text-align: center;
}

/* ============================================================
   13. DIVIDER
   ============================================================ */

.divider {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin: var(--space-lg) 0;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-light);
}

.divider-text {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: var(--fw-semibold);
}

/* ============================================================
   14. PROGRESS BAR
   ============================================================ */

.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-input);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--brand-orange);
  border-radius: var(--radius-pill);
  transition: width var(--transition-slow);
}

/* ============================================================
   15. EMPTY STATE
   ============================================================ */

.empty-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1.5px solid var(--border-light);
}

.empty-box-icon {
  font-size: 48px;
  margin-bottom: var(--space-md);
}

.empty-box-title {
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  margin-bottom: 6px;
}

.empty-box-text {
  font-size: var(--text-base);
  color: var(--text-muted);
}

/* ============================================================
   16. STATUS DOTS
   ============================================================ */

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
}

.status-dot.online { background: var(--success); }
.status-dot.offline { background: var(--danger); }
.status-dot.pending { background: var(--warning); }

/* ============================================================
   17. LINK TEXT
   ============================================================ */

.link-text {
  color: var(--brand-orange);
  font-weight: var(--fw-bold);
  text-decoration: none;
  font-size: var(--text-base);
}

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

/* ============================================================
   18. DIVIDER DASHED
   ============================================================ */

.dashed-divider {
  border: none;
  border-top: 1px dashed var(--border-light);
  margin: var(--space-md) 0;
}

/* ============================================================
   19. SAFE AREA (iOS notch)
   ============================================================ */

.safe-top {
  padding-top: env(safe-area-inset-top, 0);
}

.safe-bottom {
  padding-bottom: env(safe-area-inset-bottom, 0);
}

/* ============================================================
   20. RESPONSIVE
   ============================================================ */

@media (max-width: 360px) {
  .btn-pill,
  .btn-solid-orange {
    font-size: var(--text-md);
    padding: 13px 18px;
  }

  .master-popup-card,
  .p1-modal {
    padding: 20px 16px 16px;
  }
}

/* ============================================================
   LEGACY ALIASES (backward compatibility)
   ============================================================ */
.btn-orange {
  background: var(--brand-orange);
  color: #ffffff;
  box-shadow: var(--shadow-brand);
}

.btn-orange:active {
  background: var(--brand-orange-hover);
  transform: scale(0.98);
}
