/* ============================================================
   KingBot Mobile Fixes & Enhancements
   Additional responsive utilities for all pages
   ============================================================ */

/* ── Fix overflow issues ──────────────────────────────────── */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

/* ── Image responsiveness ─────────────────────────────────── */
img {
  max-width: 100%;
  height: auto;
}

/* ── Table responsiveness ─────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -16px;
  padding: 0 16px;
}

@media (max-width: 768px) {
  .table-wrap {
    margin: 0 -12px;
    padding: 0 12px;
  }
}

/* ── Card improvements for mobile ─────────────────────────── */
@media (max-width: 768px) {
  .card {
    border-radius: 12px;
    padding: 16px;
  }
  
  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .card-title {
    font-size: 15px;
  }
}

/* ── Form improvements for mobile ─────────────────────────── */
@media (max-width: 768px) {
  .form-group {
    margin-bottom: 16px;
  }
  
  .form-label {
    font-size: 13px;
    margin-bottom: 8px;
  }
  
  .form-control,
  .form-select,
  .form-input {
    padding: 12px 14px;
    font-size: 16px; /* Prevent zoom on iOS */
    min-height: 48px;
  }
  
  /* Larger touch targets for checkboxes/radios */
  input[type="checkbox"],
  input[type="radio"] {
    width: 22px;
    height: 22px;
  }
}

/* ── Button improvements for touch ────────────────────────── */
@media (pointer: coarse) {
  .btn,
  button,
  [role="button"] {
    min-height: 44px;
    min-width: 44px;
  }
  
  .btn-sm {
    min-height: 36px;
  }
}

/* ── Modal improvements for mobile ────────────────────────── */
@media (max-width: 768px) {
  .modal {
    align-items: flex-end;
    padding: 0;
  }
  
  .modal-content {
    width: 100%;
    max-width: 100%;
    margin: 0;
    border-radius: 20px 20px 0 0;
    max-height: 90vh;
    overflow-y: auto;
  }
  
  .modal-header {
    padding: 20px;
    position: sticky;
    top: 0;
    background: inherit;
    z-index: 10;
  }
  
  .modal-body {
    padding: 0 20px 20px;
  }
  
  /* Pull indicator for bottom sheet style */
  .modal-content::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    margin: 12px auto;
  }
  
  /* Center modal content better on mobile */
  .modal > .card {
    width: 95%;
    max-width: 95%;
    margin: 10px auto;
    max-height: 85vh;
  }
}

/* ── Toast notifications for mobile ───────────────────────── */
/* Fix: Toast container shouldn't block clicks on elements below */
.toast-container {
  pointer-events: none;
}

.toast-container .toast {
  pointer-events: auto;
}

@media (max-width: 768px) {
  .toast-container {
    top: auto;
    bottom: calc(70px + env(safe-area-inset-bottom));
    left: 12px;
    right: 12px;
    flex-direction: column-reverse;
  }
  
  .toast {
    min-width: auto;
    max-width: none;
    width: 100%;
    animation: slideUp 0.3s ease-out;
  }
  
  @keyframes slideUp {
    from {
      opacity: 0;
      transform: translateY(100%);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* ── Sidebar improvements ─────────────────────────────────── */
@media (max-width: 1024px) {
  .kb-sidebar {
    box-shadow: 10px 0 40px rgba(0, 0, 0, 0.5);
  }
  
  /* Add safe area for notched devices */
  .kb-sidebar-header {
    padding-top: calc(16px + env(safe-area-inset-top));
  }
}

/* ── Stats grid improvements ──────────────────────────────── */
@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .stat-card {
    padding: 16px 12px;
    text-align: center;
  }
  
  .stat-label {
    font-size: 10px;
    justify-content: center;
    margin-bottom: 10px;
  }
  
  .stat-value {
    font-size: 22px;
  }
  
  .stat-label i {
    display: none; /* Hide icons on very small screens */
  }
}

/* ── Grid improvements ────────────────────────────────────── */
@media (max-width: 640px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Page header improvements ─────────────────────────────── */
@media (max-width: 768px) {
  .kb-page-header {
    flex-direction: column;
    text-align: center;
    gap: 16px;
    padding: 20px;
  }
  
  .kb-page-header-icon {
    margin: 0 auto;
  }
  
  .kb-page-header-name {
    font-size: 18px;
  }
  
  .kb-page-header-sub {
    font-size: 12px;
  }
}

/* ── Navigation improvements ──────────────────────────────── */
@media (max-width: 1024px) {
  .sidebar-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    z-index: 10001; /* Higher than toast-container (10000) */
    position: relative;
  }
  
  .sidebar-toggle:active {
    background: rgba(255, 255, 255, 0.1);
  }
}

/* ── Settings page specific ──────────────────────────────── */
@media (max-width: 768px) {
  .settings-section {
    margin-bottom: 24px;
  }
  
  .settings-section .section-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
  }
  
  .settings-section .section-title {
    font-size: 16px;
  }
  
  .settings-section .section-desc {
    font-size: 12px;
  }
  
  .settings-section .card {
    margin-bottom: 10px;
  }
  
  .settings-section .card h3 {
    font-size: 14px;
  }
  
  .settings-section .card p {
    font-size: 12px;
  }
  
  /* Toggle switches on mobile */
  .settings-section .switch {
    transform: scale(0.85);
    transform-origin: right center;
  }
}



/* ── Welcome Card Designer Mobile ─────────────────────────── */
@media (max-width: 768px) {
  /* Main card designer grid: Controls + Preview */
  #card-config-panel > div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  
  /* Preview goes first on mobile */
  #card-config-panel > div[style*="grid-template-columns: 1fr 1fr"] > div:last-child {
    order: -1;
  }
  
  /* Colors grid: stack vertically */
  #card-config-panel > div > div > div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 640px) {
  /* Make color inputs full width */
  #card-config-panel input[type="color"] {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
  }
  
  /* Smaller preview */
  #welcome_card_preview {
    min-height: 160px !important;
    padding: 20px !important;
  }
  
  #welcome_card_preview img {
    width: 64px !important;
    height: 64px !important;
  }
}

/* ── Panel editor specific ────────────────────────────────── */
@media (max-width: 768px) {
  .panel-preview {
    position: relative;
    width: 100%;
    margin-top: 20px;
  }
  
  .emoji-grid {
    grid-template-columns: repeat(6, 1fr);
  }
  
  .emoji-item {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }
}



@media (max-width: 480px) {
  .emoji-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* ── Ticket list improvements ─────────────────────────────── */
@media (max-width: 768px) {
  .ticket-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
  }
  
  .ticket-meta {
    width: 100%;
    justify-content: space-between;
  }
  
  .ticket-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* ── Bot card improvements ────────────────────────────────── */
@media (max-width: 768px) {
  .bot-card {
    padding: 16px;
  }
  
  .bot-card-top {
    flex-direction: row;
    gap: 12px;
  }
  
  .bot-avatar {
    width: 48px;
    height: 48px;
  }
  
  .bot-name {
    font-size: 15px;
  }
  
  .bot-stats-row {
    flex-wrap: wrap;
    gap: 12px;
  }
  
  .bot-actions {
    flex-direction: column;
    gap: 8px;
  }
  
  .bot-actions .btn {
    width: 100%;
  }
}

/* ── Server card improvements ─────────────────────────────── */
@media (max-width: 480px) {
  .server-card {
    padding: 12px;
  }
  
  .server-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }
  
  .server-name {
    font-size: 14px;
  }
  
  .server-members {
    font-size: 11px;
  }
}

/* ── Empty state improvements ─────────────────────────────── */
@media (max-width: 768px) {
  .empty-state {
    padding: 40px 20px;
  }
  
  .empty-state-icon {
    width: 64px;
    height: 64px;
    font-size: 32px;
  }
  
  .empty-state-title {
    font-size: 16px;
  }
  
  .empty-state-text {
    font-size: 13px;
  }
}

/* ── Loading state improvements ───────────────────────────── */
@media (max-width: 768px) {
  .skeleton {
    background: linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.03) 25%,
      rgba(255, 255, 255, 0.06) 50%,
      rgba(255, 255, 255, 0.03) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
  }
  
  @keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
  }
}

/* ── Focus states for accessibility ──────────────────────── */
@media (pointer: coarse) {
  *:focus {
    outline: none;
  }
  
  *:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }
}

/* ── Prevent pull-to-refresh on mobile web apps ───────────── */
@supports (-webkit-touch-callout: none) {
  body {
    overscroll-behavior-y: none;
  }
}

/* ── Vouch Section Mobile ─────────────────────────────────── */
@media (max-width: 768px) {
  /* Vouch main grid to single column */
  #section-vouch > div:nth-child(4) {
    grid-template-columns: 1fr !important;
  }
  
  /* Button grid adjust */
  #vouch-buttons-panel > div:first-child > div {
    gap: 8px;
  }
  
  #vouch-buttons-panel > div:first-child > div > div {
    grid-template-columns: 28px 1fr 50px !important;
    padding: 8px !important;
  }
  
  #vouch-buttons-panel input[type="text"] {
    font-size: 13px !important;
    padding: 6px 8px !important;
  }
  
  #vouch-buttons-panel input[readonly] {
    font-size: 14px !important;
  }
}

/* ── Safe area insets for notched devices ─────────────────── */
@supports (padding: max(0px)) {
  .kb-nav {
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
  }
  
  .kb-main {
    padding-left: max(24px, env(safe-area-inset-left));
    padding-right: max(24px, env(safe-area-inset-right));
  }
  
  @media (max-width: 768px) {
    .kb-main {
      padding-left: max(12px, env(safe-area-inset-left));
      padding-right: max(12px, env(safe-area-inset-right));
    }
  }
}

/* ── Embed Builder Modal Mobile ───────────────────────────── */
@media (max-width: 768px) {
  /* Make modal take full screen */
  #embed-modal {
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    z-index: 99999 !important;
  }
  
  #embed-modal > div {
    max-width: 100% !important;
    height: 100% !important;
    border-radius: 0 !important;
    display: flex !important;
    flex-direction: column !important;
  }
  
  /* Modal header */
  #embed-modal > div > div:first-child {
    flex-shrink: 0;
  }
  
  /* Body becomes single column with scroll */
  #embed-modal > div > div:nth-child(2) {
    display: flex !important;
    flex-direction: column !important;
    flex: 1;
    overflow-y: auto;
  }
  
  /* Editor panel */
  #embed-modal > div > div:nth-child(2) > div:first-child {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 12px;
  }
  
  /* Preview panel */
  #embed-modal > div > div:nth-child(2) > div:last-child {
    padding: 12px;
    flex: 1;
  }
  
  /* Stack the author inputs */
  #embed-modal div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  
  /* Color picker full width */
  #embed-modal input[type="color"] {
    width: 44px;
    height: 44px;
  }
  
  /* Save/Send buttons full width */
  #embed-modal > div > div:nth-child(2) > div:last-child > div:last-child {
    flex-direction: column;
    gap: 8px;
  }
  
  #embed-modal > div > div:nth-child(2) > div:last-child > div:last-child button {
    width: 100%;
  }
}

/* ============================================================
   TESTIMONIAL SECTION - Mobile Fixes
   ============================================================ */

@media (max-width: 768px) {
  /* Testimonial tabs - horizontal scroll */
  #section-testimonial > div:nth-child(3) {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 8px;
    padding-bottom: 8px;
    margin-bottom: 16px;
  }
  
  #section-testimonial > div:nth-child(3)::-webkit-scrollbar {
    display: none;
  }
  
  #section-testimonial > div:nth-child(3) .btn {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 8px 14px;
    font-size: 13px;
  }
  
  /* Testimonial grid - single column on mobile */
  #testimonial-list {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
  
  /* Stats cards - 2x2 grid on mobile */
  #section-testimonial > div:nth-child(2) {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px;
  }
  
  #section-testimonial > div:nth-child(2) .card {
    padding: 16px 12px;
  }
  
  #section-testimonial > div:nth-child(2) .card > div {
    font-size: 24px !important;
  }
  
  /* Testimonial cards padding */
  #testimonial-list > div {
    padding: 16px;
  }
  
  /* Action buttons in testimonial cards */
  #testimonial-list > div > div:last-child {
    flex-wrap: wrap;
    gap: 8px;
  }
  
  #testimonial-list > div > div:last-child button {
    flex: 1;
    min-width: calc(50% - 4px);
  }
}

@media (max-width: 480px) {
  /* Stats cards - full width on very small screens */
  #section-testimonial > div:nth-child(2) {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  #section-testimonial > div:nth-child(2) .card > div {
    font-size: 20px !important;
  }
  
  /* Panel header adjustments */
  #section-testimonial .panel-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  #section-testimonial .panel-header > div:last-child {
    width: 100%;
    justify-content: flex-end;
  }
}

/* Testimonial Settings Modal Mobile */
@media (max-width: 768px) {
  #testi-settings-modal > div {
    grid-template-columns: 1fr !important;
    max-height: 80vh;
    overflow-y: auto;
  }
  
  #testi-settings-modal {
    max-width: 95% !important;
    width: 95% !important;
  }
}

/* ============================================================
   INVITES SECTION - Mobile Fixes
   ============================================================ */

@media (max-width: 768px) {
  /* Two column layout to single column */
  #section-invites > div:nth-child(3) {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }
  
  /* Stats cards - horizontal scroll if needed */
  #section-invites > div:nth-child(2) {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 10px;
  }
  
  #section-invites > div:nth-child(2) .card {
    padding: 16px 12px;
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  
  #section-invites > div:nth-child(2) .card > div:first-child {
    margin: 0 auto;
  }
  
  #section-invites > div:nth-child(2) .card > div:last-child > div:first-child {
    font-size: 20px !important;
  }
  
  /* Leaderboard and recent joins cards */
  #section-invites .card {
    max-height: none;
  }
  
  #invites-leaderboard-body,
  #invites-recent-body {
    max-height: 300px;
  }
}

@media (max-width: 480px) {
  /* Stats cards stack */
  #section-invites > div:nth-child(2) {
    grid-template-columns: 1fr !important;
  }
  
  #section-invites > div:nth-child(2) .card {
    flex-direction: row;
    text-align: left;
  }
  
  #section-invites > div:nth-child(2) .card > div:first-child {
    margin: 0;
  }
}

/* ============================================================
   STICKY MESSAGES - Mobile Fixes
   ============================================================ */

@media (max-width: 768px) {
  #section-sticky .grid-2 {
    grid-template-columns: 1fr !important;
  }
  
  #sticky-modal > div,
  #edit-sticky-modal > div {
    max-width: 95% !important;
    margin: 0 auto;
    max-height: 85vh;
  }
  
  /* Modal content padding */
  #sticky-modal > div > div,
  #edit-sticky-modal > div > div {
    padding: 16px;
  }
}

/* ============================================================
   CUSTOM COMMAND MODAL - Mobile Fixes
   ============================================================ */

@media (max-width: 768px) {
  #command-modal .cc-modal-card {
    max-width: 95%;
    max-height: 85vh;
  }
  
  #command-modal .cc-modal-form {
    padding: 16px;
  }
  
  #command-modal .cc-embed-grid {
    grid-template-columns: 1fr !important;
  }
  
  #command-modal .cc-actions {
    flex-direction: column-reverse;
  }
}

/* ============================================================
   PANEL MODAL - Mobile Fixes
   ============================================================ */

@media (max-width: 768px) {
  #panel-modal > div {
    max-width: 95% !important;
    margin: 10px auto;
    max-height: 90vh;
  }
  
  /* Panel step grid */
  #panel-step-1 .grid-2,
  #panel-step-2 .grid-2 {
    grid-template-columns: 1fr !important;
  }
  
  /* Ticket type cards */
  .ticket-type-card {
    padding: 16px;
  }
  
  .ticket-type-card > div {
    flex-direction: column;
    gap: 12px;
  }
  
  .ticket-type-card > div > div:first-child {
    width: 48px !important;
    height: 48px !important;
  }
  
  /* Button group at bottom */
  #panel-step-2 > div:last-child {
    flex-direction: column-reverse;
    gap: 8px;
  }
  
  #panel-step-2 > div:last-child button {
    width: 100%;
  }
}

/* ============================================================
   MOVE PANEL & CONFIRMATION MODALS - Mobile Fixes
   ============================================================ */

@media (max-width: 768px) {
  #move-panel-modal > .card,
  #confirm-modal > .card {
    width: 95% !important;
    max-width: 95% !important;
    margin: 10px auto;
  }
  
  /* Button groups */
  #move-panel-modal > .card > div:last-child > div,
  #confirm-modal > .card > div:last-child {
    flex-direction: column-reverse;
    gap: 8px;
  }
  
  #move-panel-modal > .card > div:last-child > div button,
  #confirm-modal > .card > div:last-child button {
    width: 100%;
  }
}

/* ============================================================
   TEMPLATE MODAL - Mobile Fixes
   ============================================================ */

@media (max-width: 768px) {
  #template-modal > .card {
    max-width: 95% !important;
    width: 95% !important;
  }
  
  #template-modal form > div:last-child {
    flex-direction: column-reverse;
    gap: 8px;
  }
  
  #template-modal form > div:last-child button {
    width: 100%;
  }
}

/* ============================================================
   SEND EMBED MODAL - Mobile Fixes
   ============================================================ */

@media (max-width: 768px) {
  #send-embed-modal > div {
    width: 95% !important;
    max-width: 95% !important;
  }
  
  #send-embed-modal > div > div:last-child > div:last-child {
    flex-direction: column-reverse;
    gap: 8px;
  }
  
  #send-embed-modal > div > div:last-child > div:last-child button {
    width: 100%;
  }
}

/* ============================================================
   WELCOME SECTION - Mobile Fixes
   ============================================================ */

@media (max-width: 768px) {
  /* Quick toggle bar scroll */
  #section-welcome > div:nth-child(2) {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 8px;
  }
  
  #section-welcome > div:nth-child(2)::-webkit-scrollbar {
    display: none;
  }
  
  #section-welcome > div:nth-child(2) > div {
    flex-shrink: 0;
    min-width: 160px;
  }
  
  /* Main content grid */
  #section-welcome > div:nth-child(3) {
    grid-template-columns: 1fr !important;
  }
  
  /* Welcome card designer */
  #card-config-panel > div {
    grid-template-columns: 1fr !important;
  }
  
  /* Autorole panel */
  #autorole-config-panel > div {
    max-width: 100%;
  }
}

/* ============================================================
   VOUCH SECTION - Additional Mobile Fixes
   ============================================================ */

@media (max-width: 768px) {
  /* Quick toggle bar */
  #section-vouch > div:nth-child(2) {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 8px;
  }
  
  #section-vouch > div:nth-child(2)::-webkit-scrollbar {
    display: none;
  }
  
  #section-vouch > div:nth-child(2) > div {
    flex-shrink: 0;
    min-width: 180px;
  }
  
  /* Main grid */
  #section-vouch > div:nth-child(3) {
    grid-template-columns: 1fr !important;
  }
}

/* ============================================================
   SETTINGS SECTION - Mobile Fixes
   ============================================================ */

@media (max-width: 768px) {
  /* Settings grid */
  #settings-form .grid-2 {
    grid-template-columns: 1fr !important;
  }
  
  /* Toggle rows */
  #settings-form .card > div > div {
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
  }
  
  /* Sticky save button */
  #settings-form > div:last-child {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0;
    border-radius: 0;
    z-index: 100;
    padding: 12px;
  }
  
  .has-mobile-nav #settings-form > div:last-child {
    bottom: calc(56px + env(safe-area-inset-bottom));
  }
}

/* ============================================================
   ANIMATION OPTIMIZATIONS FOR MOBILE
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Optimize for low-end devices */
@media (max-width: 320px) {
  .card,
  .btn,
  .kb-nav-list a {
    transition: none;
  }
  
  body::before {
    display: none; /* Disable grid background */
  }
}

/* ============================================================
   BRAVE BROWSER SPECIFIC FIXES
   ============================================================ */

/* Fix for Brave's shield blocking some styles */
@supports (-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px)) {
  .kb-nav,
  .kb-sidebar,
  .card {
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
  }
}

/* Ensure buttons are clickable in Brave */
button,
.btn,
[role="button"] {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Fix for Brave's aggressive font rendering */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   TOUCH ACTION FIXES
   ============================================================ */

/* Prevent zoom on double tap */
button,
a,
input,
textarea,
select {
  touch-action: manipulation;
}

/* Improve scrolling performance */
.kb-sidebar,
.modal-content,
#embed_fields_container,
#testimonial-list,
#invites-leaderboard-body,
#invites-recent-body {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* ============================================================
   PRINT STYLES
   ============================================================ */

@media print {
  .kb-nav,
  .kb-sidebar,
  .mobile-nav,
  .sidebar-toggle,
  .btn,
  button {
    display: none !important;
  }
  
  .kb-main {
    margin-left: 0;
    padding: 20px;
  }
  
  body {
    background: white;
    color: black;
  }
  
  .card {
    border: 1px solid #ccc;
    break-inside: avoid;
  }
}
