/* Base */
.tptm {
  direction: rtl;
  font-family: "IBM Plex Sans Hebrew", inherit;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Reset any conflicting table styles */
.tptm table,
.tptm table * {
  box-sizing: border-box !important;
}

.tptm table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

.tptm table td,
.tptm table th {
  border: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
.tptm h2, .tptm h3 { margin: .4rem 0; }
.tptm .tptm-error { background:#fff4f4; border:1px solid #f2c0c0; padding:12px; border-radius:8px; color:#a33; }
.tptm .tptm-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }

/* Product list */
.tptm .tptm-product-list {
  display:grid; grid-template-columns: repeat(auto-fill, minmax(32%,1fr));
  gap:12px; margin:8px 0 14px;
}
.tptm .tptm-product {
  display:flex; gap:10px; align-items:center; width:100%;
  border:1px solid #e6e6e6; padding:10px; border-radius:12px; background:#fff; cursor:pointer;
  transition:box-shadow .2s, transform .05s;
  max-width:100%;
  color:#1b2d5b;
  white-space:wrap;
}
.tptm .tptm-product:hover {color:#1b2d5b; box-shadow: 0 3px 14px rgba(0,0,0,.06); }
.tptm .tptm-product:active { transform: translateY(1px);color:#1b2d5b }
.tptm .tptm-product-thumb { width:48px; height:48px; border-radius:8px; overflow:hidden; background:#f3f3f3; flex:0 0 48px; }
.tptm .tptm-product-thumb img { width:100%; height:100%; object-fit:cover; display:block; }
.tptm .tptm-product-meta { display:flex; flex-direction:column; min-width:0; }
.tptm .tptm-product-name {
  font-weight:600; max-width:100%;text-align:right;
}
.tptm .tptm-product-sku { font-size:.85rem; color:#666;}

.tptm .tptm-confirm {display: block !important;
  padding: 5px 20px !important;
  min-height: auto !important;
  border-radius: 50px !important;margin:0 auto;}


/* Buttons */
.tptm .tptm-tools { margin:10px 0 18px;text-align:center }
#tptm-scan {background:#121f41;color:#fff;border:0;border-radius:50px;font-weight:700;padding:7px 25px;}
.tptm .tptm-btn { 
  border:1px solid #e0e0e0; 
  background:#fff; 
  padding:8px 12px; 
  border-radius:10px; 
  cursor:pointer; 
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;

  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.tptm .tptm-btn-primary { background:#1f6feb; color:#fff; border-color:#1f6feb; }
.tptm .tptm-btn-secondary { background:#f5f7fb; }
.tptm .tptm-btn:disabled { opacity:.5; cursor:not-allowed; }
.tptm .tptm-busy { opacity:.8; }

/* Panel & stats */
.tptm .tptm-product-panel { border-top:1px solid #eee; padding-top:12px; }
.tptm .tptm-hidden { display:none; }

.tptm .tptm-panel-header { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.tptm .tptm-selected-product { font-size:1.05rem; font-weight:700; }
.tptm .tptm-stats { display:flex; gap:18px; flex-wrap:wrap; }
.tptm .tptm-stats div { background:#fafafa; border:1px solid #eee; padding:8px 10px; border-radius:10px; }

/* Filters */
.tptm .tptm-filters { margin:12px 0; }
.tptm #tptm-search { width:100%; padding:10px 12px; border:1px solid #ddd; border-radius:10px; }

/* Table */
.tptm .tptm-table-wrap { 
  position: relative; 
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tptm .tptm-table { 
  width: 100% !important; 
  border-collapse: separate !important; 
  border-spacing: 0 !important; 
  border: 1px solid #eee !important; 
  border-radius: 12px !important; 
  overflow: hidden !important; 
  background: #fff !important;
  font-size: 14px !important;
  table-layout: auto !important;
}

.tptm .tptm-table thead th { 
  background: #f8f9fb !important; 
  text-align: right !important; 
  font-weight: 700 !important; 
  padding: 12px 10px; 
  border-bottom: 1px solid #eee !important;
  font-size: 13px !important;
  white-space: nowrap !important;
}

.tptm .tptm-table tbody td { 
  padding: 10px !important; 
  border-bottom: 1px solid #f2f2f2 !important; 
  vertical-align: middle !important;
  font-size: 13px !important;
}

.tptm .tptm-table tbody tr:last-child td { 
  border-bottom: none !important; 
}
/*
.tptm .tptm-table tbody tr:hover {
  background-color: #f8f9fb !important;
}*/

.tptm .tptm-table tbody tr:nth-child(even) {
  background-color: #fafafa !important;
}
/*
.tptm .tptm-table tbody tr:nth-child(even):hover {
  background-color: #f0f0f0 !important;
}*/

/* Completed highlight */
.tptm .tptm-table tbody tr.tptm-complete {
  background-color: #FF746C !important;
}
.tptm .tptm-mobile-card.tptm-complete,
.tptm .tptm-order-item.tptm-complete {
  background-color: #FF746C !important;
  border-color: #f2c0c0 !important;
}

.tptm-guestlist-wrap .tptm-table thead th,
.tptm-guestlist-wrap .tptm-table tbody td {padding:5px !important}

.tptm-guestlist-wrap .tptm-table button {font-size:14px;margin:0 auto;}
.tptm .tptm-mobile-guestlist .tptm-table td input,
.tptm-guestlist-wrap input[type=text] {padding: 5px 8px;
  font-size: 13px;
  border-radius: 2px;
  border-color: #d7d7d7;}

/* Override common WordPress theme table styles */
.tptm .tptm-table,
.tptm .tptm-table table,
.tptm .tptm-table thead,
.tptm .tptm-table tbody,
.tptm .tptm-table tfoot,
.tptm .tptm-table tr,
.tptm .tptm-table th,
.tptm .tptm-table td {
  border: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  font-size: inherit !important;
  line-height: inherit !important;
  color: inherit !important;
  text-align: inherit !important;
  vertical-align: inherit !important;
  font-weight: inherit !important;
  font-family: inherit !important;
}

/* Ensure our specific table styles take precedence */
.tptm .tptm-table {
  border: 1px solid #eee !important;
  border-radius: 12px !important;
  background: #fff !important;
}

.tptm .tptm-table thead th {
  background: #f8f9fb !important;
  padding: 12px 10px !important;
  border-bottom: 1px solid #eee !important;
  font-weight: 700 !important;
  text-align: right !important;
}

.tptm .tptm-table tbody td {
  padding: 10px;
  border-bottom: 1px solid #f2f2f2 !important;
  vertical-align: middle !important;
}

/* Mobile cards - hidden by default on desktop */
.tptm .tptm-mobile-cards {
  display: none;
}
.tptm select.tptm-qty-select { 
  padding:6px 8px; 
  border:1px solid #ddd; 
  border-radius:8px; 
  max-width:100%; 
  min-height: auto; /* Touch-friendly */
  font-size: 15px; /* Prevent zoom on iOS */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: left 8px center;
  background-size: 16px;
  padding-left: 32px;
}

/* Pagination */
.tptm .tptm-pagination { display:flex; gap:12px; align-items:center; justify-content:flex-end; padding:10px 0; }
.tptm .tptm-pages { display:flex; gap:6px; align-items:center; }
.tptm .tptm-page-btn { border:1px solid #e0e0e0; background:#fff; padding:6px 10px; border-radius:8px; cursor:pointer; min-width:36px; }
.tptm .tptm-page-btn.is-active { background:#1f6feb; color:#fff; border-color:#1f6feb; cursor:default; }
.tptm .tptm-page-ellipsis { color:#888; padding:0 4px; }

/* Guest list responsive container */
.tptm .tptm-guestlist-row > td { padding: 0 !important; }
.tptm .tptm-guestlist-wrap,
.tptm .tptm-mobile-guestlist {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}
.tptm .tptm-guestlist-wrap .tptm-table,
.tptm .tptm-mobile-guestlist .tptm-table {
  width: auto !important;         /* allow content width to define scroll */
  min-width: 560px;               /* enable horizontal scroll on small screens */
  table-layout: auto !important;  /* avoid squashing columns too much */
}
.tptm .tptm-guestlist-wrap .tptm-table td input,
.tptm .tptm-mobile-guestlist .tptm-table td input {
  width: 100%;
  max-width: 200px;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .tptm .tptm-guestlist-wrap .tptm-table,
  .tptm .tptm-mobile-guestlist .tptm-table { min-width: 520px; }
  .tptm .tptm-guestlist-wrap .tptm-table td,
  .tptm .tptm-mobile-guestlist .tptm-table td {
    padding: 8px !important;
  }
}

/* Mobile stacked table for tptm-mobile-guestlist */
@media (max-width: 768px) {
  .tptm .tptm-mobile-guestlist .tptm-table {
    width: 100% !important;
    min-width: 0;
    border: 0 !important;
  }
  .tptm .tptm-mobile-guestlist .tptm-table thead {
    display: none;
  }
  .tptm .tptm-mobile-guestlist .tptm-table tbody,
  .tptm .tptm-mobile-guestlist .tptm-table tr,
  .tptm .tptm-mobile-guestlist .tptm-table td {
    display: block;
    width: 100%;
  }
  .tptm .tptm-mobile-guestlist .tptm-table tr {
    border: 1px solid #eee !important;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #fff;
  }
  .tptm .tptm-mobile-guestlist .tptm-table td {
    border: 0 !important;
    border-bottom: 1px solid #f2f2f2 !important;
    padding: 10px !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  .tptm .tptm-mobile-guestlist .tptm-table td:last-child {
    border-bottom: 0 !important;
  }
  .tptm .tptm-mobile-guestlist .tptm-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #555;
    margin-inline-end: 10px;
    flex: 1 0 40%;
  }
  .tptm .tptm-mobile-guestlist .tptm-table td > *:not(:first-child) {
    flex: 1 1 60%;
  }
  .tptm .tptm-mobile-guestlist .tptm-table td input {
    width: 100%;
  }
}

/* Loading overlay */
.tptm .tptm-loading { position:relative; }
.tptm .tptm-loading::after {
  content:''; position:absolute; inset:0; background:rgba(255,255,255,.6);
  backdrop-filter:saturate(120%) blur(2px);
}
.tptm .tptm-loading::before {
  content:''; position:absolute; top:50%; left:50%; width:24px; height:24px; margin:-12px 0 0 -12px;
  border-radius:50%; border:3px solid #ccc; border-top-color:#1f6feb; animation:tptm-spin .9s linear infinite;
}
@keyframes tptm-spin { to { transform:rotate(360deg); } }

/* Toast */
.tptm .tptm-toast {
  position:fixed; right:16px; bottom:16px; background:#1f6feb; color:#fff; padding:10px 14px;
  border-radius:10px; opacity:0; transform:translateY(6px); transition: all .2s; z-index:99999;
}
.tptm .tptm-toast.err { background:#d33; }
.tptm .tptm-toast.show { opacity:1; transform:translateY(0); }

/* Modal (closed by default) */
#tptm-qr-modal { display:none; }
#tptm-qr-modal.is-open { display:flex; }
#tptm-qr-modal {
  position:fixed; inset:0; background:rgba(0,0,0,.4);
  align-items:center; justify-content:center; z-index:9999;
}
.tptm .tptm-modal-content { width:min(720px, 96vw); background:#fff; border-radius:12px; overflow:hidden; }
.tptm .tptm-modal-header { display:flex; align-items:center; justify-content:space-between; padding:10px 14px; background:#f8f9fb; }
.tptm .tptm-modal-body { padding:14px; }
.tptm .tptm-modal-close { background:transparent; border:none; font-size:22px; line-height:1; cursor:pointer; }
.tptm .tptm-note { color:#666; font-size:.9rem; }

/* Bulk email: selection */
.tptm-sr-only {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.tptm .tptm-bulk-bar {display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-block-start:10px}
.tptm .tptm-btn:focus-visible {outline:2px solid #1f6feb;outline-offset:2px}
.tptm .tptm-col-select {width:40px;text-align:center}
.tptm .tptm-sel, .tptm .tptm-sel-page {width:24px;height:24px;margin:0;cursor:pointer;accent-color:#1f6feb;vertical-align:middle}
.tptm .tptm-sel:focus-visible, .tptm .tptm-sel-page:focus-visible {outline:2px solid #1f6feb;outline-offset:2px}
.tptm .tptm-sel-page:disabled {cursor:not-allowed}
.tptm .tptm-sel-wrap[hidden] {display:none}
.tptm .tptm-mobile-select {display:flex;align-items:center;gap:6px;min-height:24px;margin-block-end:8px;font-size:.85rem}
.tptm .tptm-mobile-select label {cursor:pointer}

/* Bulk email: dialog */
html.tptm-email-lock, html.tptm-email-lock body {overflow:hidden}
.tptm-email-overlay {position:fixed;inset:0;z-index:60000;display:flex;align-items:center;justify-content:center;padding:12px;background:rgba(0,0,0,.45);box-sizing:border-box}
.tptm-email-overlay[hidden] {display:none}
.tptm-email-overlay .tptm-email-dialog {display:flex;flex-direction:column;width:min(40rem, 96vw);max-height:calc(100vh - 24px);overflow:auto;background:#fff;border-radius:12px;box-shadow:0 10px 40px rgba(0,0,0,.25)}
.tptm-email-overlay .tptm-email-dialog[aria-busy="true"] {cursor:progress}
.tptm-email-overlay .tptm-modal-header h3 {margin:0;font-size:1.1rem}
.tptm-email-overlay .tptm-modal-close {min-width:32px;min-height:32px;border-radius:6px}
.tptm-email-overlay .tptm-modal-close:focus-visible {outline:2px solid #1f6feb;outline-offset:2px}
.tptm-email-overlay .tptm-modal-close:disabled {opacity:.5;cursor:not-allowed}
.tptm-email-overlay .tptm-email-field {display:flex;flex-direction:column;gap:6px;margin-block-end:12px}
.tptm-email-overlay .tptm-email-field > label, .tptm-email-overlay .tptm-email-test-row > label {font-weight:600}
.tptm-email-overlay #tptm-email-subject, .tptm-email-overlay #tptm-email-test-to {width:100%;min-height:40px;padding:8px 10px;border:1px solid #8c8f94;border-radius:6px;font-size:16px;box-sizing:border-box;background:#fff;color:#111}
.tptm-email-overlay #tptm-email-subject:focus-visible, .tptm-email-overlay #tptm-email-test-to:focus-visible {outline:2px solid #1f6feb;outline-offset:1px}
.tptm-email-overlay [aria-invalid="true"] {border-color:#b32d2e;box-shadow:0 0 0 1px #b32d2e}
.tptm-email-overlay #tptm-email-content {width:100%;box-sizing:border-box}
.tptm-email-overlay .tptm-email-tags {display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.tptm-email-overlay .tptm-email-tag {min-height:28px;padding:4px 10px;border:1px solid #c7d2fe;border-radius:8px;background:#eef2ff;color:#1e293b;font-size:.875rem;cursor:pointer}
.tptm-email-overlay .tptm-email-tag:hover {background:#e0e7ff}
.tptm-email-overlay .tptm-email-tag:focus-visible {outline:2px solid #1f6feb;outline-offset:2px}
.tptm-email-overlay .tptm-email-error {margin:0 0 8px;color:#b32d2e;font-weight:600}
.tptm-email-overlay .tptm-email-test {margin-block:8px}
.tptm-email-overlay .tptm-email-test summary {min-height:24px;font-weight:600;cursor:pointer}
.tptm-email-overlay .tptm-email-test summary:focus-visible {outline:2px solid #1f6feb;outline-offset:2px}
.tptm-email-overlay .tptm-email-test-row {display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-block-start:8px}
.tptm-email-overlay .tptm-email-test-row > label {flex-basis:100%}
.tptm-email-overlay .tptm-email-test-row #tptm-email-test-to {flex:1 1 14rem;width:auto}
.tptm-email-overlay #tptm-email-live {margin:8px 0 0}
.tptm-email-overlay .tptm-email-actions {display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;padding:12px 14px;border-block-start:1px solid #e5e7eb;background:#f8f9fb}

/* QR Scanner */
#tptm-qr-target { 
  min-height: 300px; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  background: #f8f9fb; 
  border-radius: 8px; 
  margin-bottom: 10px;
}
#tptm-qr-target canvas { border-radius: 8px; }

/* Guestlist modal (product page) */
.tptm-gl-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}
.tptm-gl-content {
  width: min(720px, 96vw);
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}
.tptm-gl-header {
  position:relative;
  display: block;
  text-align: center;
  
  padding: 10px 14px;
  background: #f8f9fb;
}
.tptm-gl-title {
  margin: 0;
  font-size: 18px;
}
.tptm-gl-header p {margin: 10px 0;font-size: 16px;}
.tptm-gl-close {
	position:absolute;left:5px;top:5px;
  background: transparent;
  border: 0 !important;color:#000 !important;background:#fff !important;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.tptm-gl-fields label {font-size:14px;margin-bottom:5px;font-weight:500;}

.tptm-gl-footer .tptm-gl-cancel {background: #d7d7d7;border: 0 !important;border-radius: 30px;padding: 8px 22px;color: #000;}
.tptm-gl-footer .tptm-gl-cancel:hover,.tptm-gl-footer .tptm-gl-cancel:active,.tptm-gl-footer .tptm-gl-cancel:focus {background:#000;color:#fff;}
.tptm-gl-footer .tptm-gl-save {background: #0056B3;color: #fff;border: 1px solid #0056B3;border-radius: 30px;padding: 8px 22px;}
.tptm-gl-footer .tptm-gl-save:hover,.tptm-gl-footer .tptm-gl-save:active,.tptm-gl-footer .tptm-gl-save:focus
{background:#1F3467}
.tptm-gl-body {
  padding: 14px;
  max-height: 70vh;
  overflow: auto;
}
.tptm-gl-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 10px 14px;
  background: #f8f9fb;
}


/* Order Info Display */
.tptm .tptm-order-info {
  background: #f8f9fb; 
  border: 1px solid #e6e6e6; 
  border-radius: 12px; 
  padding: 16px; 
  margin-bottom: 16px;
}
.tptm .tptm-order-info h4 { margin: 0 0 8px 0; color: #1f6feb; }
.tptm .tptm-order-info p { margin: 4px 0; font-size: 0.9rem; }

/* Order Items */
.tptm .tptm-order-item {
  background: #fff; 
  border: 1px solid #e6e6e6; 
  border-radius: 12px; 
  padding: 16px; 
  margin-bottom: 12px;
  transition: box-shadow 0.2s;
}
.tptm .tptm-order-item:hover { box-shadow: 0 3px 14px rgba(0,0,0,.06); }

.tptm .tptm-item-header h5 { 
  margin: 0 0 12px 0; 
  color: #333; 
  font-size: 1.1rem; 
  font-weight: 600;
}

.tptm .tptm-item-stats {
  display: flex; 
  gap: 16px; 
  margin-bottom: 16px; 
  flex-wrap: wrap;
}
.tptm .tptm-item-stats div {
  background: #fafafa; 
  border: 1px solid #eee; 
  padding: 8px 12px; 
  border-radius: 8px; 
  font-size: 0.9rem;
}

.tptm .tptm-item-controls {
  display: flex; 
  align-items: center; 
  gap: 12px; 
  flex-wrap: wrap;
}
.tptm .tptm-item-controls label {
  font-weight: 600; 
  color: #333; 
  margin: 0;
}
.tptm .tptm-item-controls .tptm-qty-select {
  padding: 6px 8px; 
  border: 1px solid #ddd; 
  border-radius: 6px; 
  min-width: 80px;
}
.tptm .tptm-item-controls .tptm-update-item {
  padding: 8px 16px; 
  font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  /* Product grid responsive */
  .tptm .tptm-product-list {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  /* Product cards mobile */
  .tptm .tptm-product {
    padding: 8px;
    gap: 8px;
  }
  
  .tptm .tptm-product-thumb {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
  }
  
  .tptm .tptm-product-name {
    font-size: 0.9rem;
  }
  
  .tptm .tptm-product-sku {
    font-size: 0.8rem;
  }
  
  /* Header responsive */
  .tptm .tptm-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .tptm .tptm-panel-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .tptm .tptm-stats {
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }
  
  .tptm .tptm-stats div {
    width: 100%;
    text-align: center;
  }
  
  /* Hide table on mobile and show card layout */
  .tptm .tptm-table-wrap {
    display: none;
  }
  
  /* Mobile card layout for table data */
  .tptm .tptm-mobile-cards {
    display: block;
  }
  
  .tptm .tptm-mobile-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  }
  
  .tptm .tptm-mobile-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
  }
  
  .tptm .tptm-mobile-card-title {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
  }
  
  .tptm .tptm-mobile-card-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
  }
  
  .tptm .tptm-mobile-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
  }
  
  .tptm .tptm-mobile-card-label {
    font-weight: 500;
    color: #666;
    font-size: 0.85rem;
  }
  
  .tptm .tptm-mobile-card-value {
    color: #333;
    font-size: 0.85rem;
  }
  
  .tptm .tptm-mobile-card-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
  }
  
  .tptm .tptm-mobile-card-controls .tptm-qty-select {
    width: 100%;
    max-width: 120px;
  }
  
  .tptm .tptm-mobile-card-controls .tptm-btn {
    width: 100%;
  }
  
  /* Modal responsive */
  .tptm .tptm-modal-content {
    width: 95vw;
    margin: 10px;
  }
  
  .tptm .tptm-modal-body {
    padding: 10px;
  }
  
  /* QR Scanner mobile */
  #tptm-qr-target {
    min-height: 250px;
  }
  
  /* Order items mobile */
  .tptm .tptm-item-stats { 
    flex-direction: column; 
    gap: 8px; 
  }
  
  .tptm .tptm-item-controls { 
    flex-direction: column; 
    align-items: flex-start; 
    gap: 8px;
  }
  
  .tptm .tptm-item-controls .tptm-qty-select { 
    width: 100%; 
    max-width: 120px; 
  }
  
  /* Buttons mobile */
  .tptm .tptm-btn {
    padding: 12px 16px;
    font-size: 0.9rem;
    min-height: 48px; /* Larger touch targets on mobile */
    width: 100%;
    margin-bottom: 8px;
  }
  
  /* Product cards touch-friendly */
  .tptm .tptm-product {
    min-height: 60px; /* Larger touch targets */
    padding: 12px;
  }
  
  /* Search mobile */
  .tptm #tptm-search {
    padding: 12px;
    font-size: 16px; /* Prevent zoom on iOS */
  }
  
  /* Pagination mobile */
  .tptm .tptm-pagination {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  .tptm .tptm-product {
    padding: 6px;
  }
  
  .tptm .tptm-product-thumb {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
  }
  
  .tptm .tptm-table {
    min-width: 500px;
  }
  
  .tptm .tptm-table thead th,
  .tptm .tptm-table tbody td {
    padding: 6px 4px;
    font-size: 0.8rem;
  }
  
  .tptm .tptm-modal-content {
    width: 98vw;
    margin: 5px;
  }
  
  #tptm-qr-target {
    min-height: 200px;
  }
}