/*
 * EarnPlay BD — Global Mobile Styles
 * Mobile-first, optimized for Bangladesh smartphone users
 * Supports: 320px - 768px screens
 */

/* ─── Prevent iOS font size adjust ──────────────── */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* ─── Prevent iOS input zoom (keep font 16px+) ─── */
input, select, textarea {
  font-size: 16px !important;
}

/* ═══════════════════════════════════════════════════
   MOBILE BREAKPOINT (max 768px)
═══════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* ─── Sidebar: hide on mobile ────────────────── */
  .sidebar {
    transform: translateX(-100%) !important;
    width: 280px !important;
    z-index: 200 !important;
    transition: transform 0.3s ease !important;
  }
  .sidebar.open {
    transform: translateX(0) !important;
  }
  .sidebar-overlay.show {
    display: block !important;
  }

  /* ─── Mobile header: always show ────────────── */
  .mobile-header {
    display: flex !important;
  }

  /* ─── Main content: full width ───────────────── */
  .main {
    margin-left: 0 !important;
    padding: 16px !important;
    padding-top: 70px !important;
    padding-bottom: 90px !important; /* space for bottom nav */
  }

  /* ─── Bottom Navigation Bar ──────────────────── */
  .bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 100;
    background: #0c1420;
    border-top: 1px solid rgba(0,255,136,0.15);
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
    justify-content: space-around;
    align-items: center;
  }

  /* ─── Page titles ─────────────────────────────── */
  .page-title {
    font-size: 1.1rem !important;
  }

  /* ─── Cards grid: single column ─────────────── */
  .cards-grid,
  .balance-grid,
  .status-grid,
  .stats-grid,
  .two-col,
  .info-grid,
  .features-inner,
  .actions-grid,
  .method-grid,
  .top-grid,
  .summary-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* ─── Form rows: single column ───────────────── */
  .form-row {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* ─── Cards: full width, comfortable padding ── */
  .info-card,
  .sec-card,
  .withdraw-card,
  .form-card,
  .section-card,
  .req-card,
  .method-status-card,
  .sum-card,
  .stat-card,
  .bal-card,
  .steps-card,
  .message-card,
  .status-card {
    border-radius: 12px !important;
  }

  .form-body,
  .sec-body,
  .card-body {
    padding: 16px !important;
  }

  .form-card-header,
  .card-header {
    padding: 14px 16px !important;
  }

  /* ─── Buttons: full width, big touch area ─────── */
  .btn-submit,
  .btn-pay,
  .btn-action {
    min-height: 50px !important;
    font-size: 0.95rem !important;
    border-radius: 10px !important;
  }

  .btn-hero {
    padding: 14px 28px !important;
    font-size: 0.95rem !important;
    width: 100% !important;
    text-align: center !important;
  }

  .hero-cta {
    flex-direction: column !important;
    width: 100% !important;
    gap: 12px !important;
  }

  /* ─── Inputs: comfortable for thumbs ─────────── */
  input,
  select,
  textarea {
    padding: 13px 14px 13px 40px !important;
    border-radius: 10px !important;
    min-height: 48px !important;
  }

  textarea {
    padding: 13px 14px !important;
    min-height: 80px !important;
  }

  /* ─── Status steps: scrollable ───────────────── */
  .steps-track {
    overflow-x: auto !important;
    padding-bottom: 8px !important;
    -webkit-overflow-scrolling: touch;
  }

  .step-circle {
    width: 28px !important;
    height: 28px !important;
    font-size: 0.72rem !important;
  }

  .step-label {
    font-size: 0.58rem !important;
    max-width: 52px !important;
  }

  .step-line {
    min-width: 16px !important;
  }

  /* ─── Tables: horizontal scroll ──────────────── */
  .table-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  table {
    min-width: 600px !important;
  }

  /* ─── Status banner ───────────────────────────── */
  .status-banner {
    flex-direction: column !important;
    text-align: center !important;
    padding: 16px !important;
    gap: 10px !important;
  }

  /* ─── User header in admin ────────────────────── */
  .user-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 14px !important;
  }

  .user-header-actions {
    flex-direction: row !important;
    width: 100% !important;
  }

  /* ─── KYC fields ──────────────────────────────── */
  .kyc-fields {
    grid-template-columns: 1fr !important;
  }

  /* ─── Review grid ─────────────────────────────── */
  .review-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  /* ─── Quick actions ───────────────────────────── */
  .actions-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }

  .action-btn {
    padding: 16px 10px !important;
    font-size: 0.78rem !important;
    border-radius: 12px !important;
  }

  .action-btn .action-icon {
    font-size: 1.5rem !important;
  }

  /* ─── Request card top ────────────────────────── */
  .req-top {
    gap: 10px !important;
    padding: 14px 14px !important;
  }

  .req-actions {
    flex-wrap: wrap !important;
    padding: 12px 14px !important;
    gap: 8px !important;
  }

  .btn-pay {
    min-width: 100% !important;
  }

  .req-details {
    grid-template-columns: 1fr 1fr !important;
  }

  .rd-item {
    padding: 10px 14px !important;
  }

  /* ─── Amount display ──────────────────────────── */
  .amount-big {
    font-size: 1.2rem !important;
  }

  /* ─── Balance cards ───────────────────────────── */
  .bal-amount {
    font-size: 1.6rem !important;
  }

  .stat-num,
  .sum-num {
    font-size: 1.5rem !important;
  }

  /* ─── Card value ──────────────────────────────── */
  .card-value {
    font-size: 1.3rem !important;
  }

  /* ─── Hero section ────────────────────────────── */
  .hero {
    padding: 90px 20px 60px !important;
    min-height: auto !important;
  }

  .hero h1 {
    font-size: 1.7rem !important;
    line-height: 1.2 !important;
  }

  .hero-subtitle {
    font-size: 0.9rem !important;
  }

  /* ─── Stats bar ───────────────────────────────── */
  .stats-bar {
    flex-direction: column !important;
    padding: 20px !important;
  }

  .stat-item {
    border-right: none !important;
    border-bottom: 1px solid rgba(0,255,136,0.1) !important;
    padding: 12px 0 !important;
  }

  .stat-item:last-child {
    border-bottom: none !important;
  }

  .stat-num {
    font-size: 1.6rem !important;
  }

  /* ─── Steps card (how it works) ───────────────── */
  .steps {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }

  .step-card {
    padding: 20px 14px !important;
  }

  .step-icon {
    font-size: 1.8rem !important;
  }

  /* ─── Payment cards ───────────────────────────── */
  .pay-card {
    padding: 16px !important;
  }

  /* ─── Filter tabs ─────────────────────────────── */
  .filter-tabs {
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    padding-bottom: 8px !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
  }

  .filter-tabs::-webkit-scrollbar {
    display: none !important;
  }

  .ftab {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    padding: 7px 14px !important;
    font-size: 0.78rem !important;
  }

  /* ─── Toolbar ─────────────────────────────────── */
  .toolbar {
    flex-direction: column !important;
  }

  .search-wrap {
    min-width: 100% !important;
  }

  .date-input {
    width: 100% !important;
  }

  /* ─── Pagination ──────────────────────────────── */
  .pagination {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
    padding: 14px 16px !important;
  }

  /* ─── Congrats popup ──────────────────────────── */
  .congrats-box {
    padding: 32px 24px !important;
    max-width: 92vw !important;
  }

  .congrats-amount {
    font-size: 2rem !important;
  }

  /* ─── Form step tabs ──────────────────────────── */
  .form-step {
    font-size: 0.7rem !important;
    padding: 10px 6px !important;
  }

  /* ─── Example photo section ───────────────────── */
  .example-photo-wrap {
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  .example-img-box {
    width: 100% !important;
    height: 180px !important;
  }

  /* ─── Nav badges ──────────────────────────────── */
  .nav-badge {
    font-size: 0.6rem !important;
    padding: 1px 5px !important;
  }

  /* ─── Method selector ─────────────────────────── */
  .method-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  .method-btn {
    padding: 14px 10px !important;
  }

  /* ─── Summary box ─────────────────────────────── */
  .summary-box {
    padding: 14px !important;
  }

  /* ─── Footer ──────────────────────────────────── */
  footer {
    flex-direction: column !important;
    text-align: center !important;
    gap: 12px !important;
    padding: 20px 16px !important;
  }

  .footer-links {
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 16px !important;
  }

  /* ─── FAQ ─────────────────────────────────────── */
  .faq-q {
    font-size: 0.85rem !important;
    padding: 14px 14px !important;
  }

  .faq-a {
    font-size: 0.82rem !important;
    padding: 0 14px !important;
  }

  .faq-item.open .faq-a {
    padding: 0 14px 14px !important;
  }

  /* ─── Channel items ───────────────────────────── */
  .channel-item {
    padding: 14px !important;
  }

  /* ─── Timeline ────────────────────────────────── */
  .tl-item {
    gap: 10px !important;
  }

  .tl-name {
    font-size: 0.82rem !important;
  }

  .tl-desc {
    font-size: 0.74rem !important;
  }
}

/* ═══════════════════════════════════════════════════
   SMALL PHONE (max 400px)
═══════════════════════════════════════════════════ */
@media (max-width: 400px) {

  .hero h1 {
    font-size: 1.45rem !important;
  }

  .steps {
    grid-template-columns: 1fr !important;
  }

  .cards-grid {
    grid-template-columns: 1fr !important;
  }

  .actions-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  .method-grid {
    grid-template-columns: 1fr !important;
  }

  .req-details {
    grid-template-columns: 1fr !important;
  }

  .review-grid {
    grid-template-columns: 1fr !important;
  }

  .page-title {
    font-size: 1rem !important;
  }

  .card-value {
    font-size: 1.1rem !important;
  }

  .bal-amount {
    font-size: 1.3rem !important;
  }

  .form-step {
    font-size: 0.62rem !important;
    padding: 8px 4px !important;
  }
}

/* ═══════════════════════════════════════════════════
   BOTTOM NAVIGATION (User pages)
   Hidden by default, shown on mobile
═══════════════════════════════════════════════════ */
.bottom-nav {
  display: none;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: #7a8aaa;
  font-size: 0.6rem;
  font-weight: 600;
  transition: all 0.2s;
  min-width: 52px;
  font-family: 'Poppins', sans-serif;
  background: none;
  border: none;
  cursor: pointer;
}

.bottom-nav-item .bn-icon {
  font-size: 1.3rem;
  line-height: 1;
}

.bottom-nav-item.active {
  color: #00ff88;
}

.bottom-nav-item.active .bn-icon {
  filter: drop-shadow(0 0 6px rgba(0,255,136,0.5));
}

/* Admin bottom nav uses orange */
.admin-bottom-nav .bottom-nav-item.active {
  color: #ff8c00;
}
