/* 24Ounce account admin/customers frontend pages */

/* from templates/account-admin.php */
/* Admin tabs inside account page (templates only) */
.tfo-admin-tabs{display:flex;flex-direction:column;gap:12px;}
/* Sticky tab bar (better UX on mobile while scrolling tables) */
.tfo-admin-tabbar{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  position:sticky;
  top:0;
  z-index:30;
  background:#fff;
  padding:8px 0;
}
.tfo-admin-tabbtn{
  appearance:none;
  border:1px solid var(--tfo-border);
  background:#fff;
  color:var(--tfo-text);
  border-radius:999px;
  padding:10px 14px;
  font-weight:900;
  cursor:pointer;
  min-height:44px;
}
.tfo-admin-tabbtn.is-active{border-color:rgba(187,168,126,.75);background:rgba(187,168,126,.16);}
.tfo-admin-panel{display:none;}
.tfo-admin-panel.is-active{display:block;}

/* Hide duplicated page headings inside embedded admin pages */
.tfo-admin-panel .wrap > h1{display:none;}
.tfo-admin-panel .wrap{padding-top:0;}

/* Make wp-admin tables usable on frontend */
.tfo-account .wrap{margin:0;}
.tfo-account .wrap h1{margin:0 0 12px 0;font-size:16px;font-weight:900;}
.tfo-account .description{color:var(--tfo-muted);font-size:13px;line-height:1.6;}
.tfo-account .widefat{width:100%;border-collapse:collapse;background:#fff;border:1px solid var(--tfo-border);border-radius:14px;overflow:hidden;}
.tfo-account .widefat th,.tfo-account .widefat td{padding:12px 10px;border-bottom:1px solid var(--tfo-border);text-align:right;vertical-align:top;font-size:13px;white-space:nowrap !important;word-break:keep-all !important;overflow-wrap:normal !important;}
.tfo-account .widefat thead th{background:rgba(187,168,126,.10);font-weight:900;}
.tfo-account .widefat.striped tbody tr:nth-child(odd){background:rgba(0,0,0,.02);}
.tfo-account .button{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:8px 12px;border-radius:12px;border:1px solid var(--tfo-border);background:#fff;color: #000; font-weight:900;cursor:pointer;}
.tfo-account .button-primary{background:#111;color:var(--tfo-gold-2);border-color:rgba(17,17,17,.18);}

/* Black/Gold toggle (BUY lock) */
.tfo-account .tfo-buy-switch{display:inline-flex;align-items:center;justify-content:center;}
.tfo-account .tfo-buy-switch input{position:absolute;opacity:0;width:1px;height:1px;}
.tfo-account .tfo-buy-slider{
  width:44px;height:24px;border-radius:999px;
  background:#111;border:1px solid rgba(187,168,126,.55);
  position:relative;display:inline-block;cursor:pointer;
  transition:background .18s ease,border-color .18s ease;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.06);
}
.tfo-account .tfo-buy-slider:before{
  content:'';
  position:absolute;top:50%;left:3px;
  width:18px;height:18px;border-radius:999px;
  transform:translateY(-50%);
  background: linear-gradient(135deg,#d8c27a,#bba87e);
  box-shadow:0 2px 8px rgba(0,0,0,.18);
  transition:transform .18s ease,background .18s ease;
}
.tfo-account .tfo-buy-switch input:checked + .tfo-buy-slider{
  background: linear-gradient(135deg,#d8c27a,#bba87e);
  border-color: rgba(17,17,17,.25);
}
.tfo-account .tfo-buy-switch input:checked + .tfo-buy-slider:before{
  transform:translate(20px,-50%);
  background:#111;
}
.tfo-account .tfo-buy-switch input:focus + .tfo-buy-slider{
  outline:2px solid rgba(187,168,126,.35);
  outline-offset:2px;
}

/* Table scroll wrapper (works across all admin pages) */
.tfo-admin-table-scroll{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;}
.tfo-admin-table-scroll table{min-width:920px;}
/* Prices table should fit without forced width */
.tfo-admin-panel--prices .tfo-admin-table-scroll table{min-width:0;}

/* Mobile improvements */
@media (max-width: 640px){
  /* Fixed, non-scrolling tabs: wrap into rows */
  .tfo-admin-tabbar{gap:8px;}
  .tfo-admin-tabbtn{
    padding:8px 10px;
    font-size:13px;
    min-height:38px;
    white-space:nowrap;
    flex:1 1 calc(33.333% - 8px);
    text-align:center;
  }

  /* On mobile, rely on horizontal scroll wrapper (no squeezed/vertical text) */
  .tfo-admin-table-scroll table{min-width:860px;}
  .tfo-admin-panel--prices .tfo-admin-table-scroll table{min-width:0;}
  .tfo-account .widefat th,.tfo-account .widefat td{padding:8px 8px;font-size:12px;}
  .tfo-account .button{min-height:34px;padding:6px 10px;font-size:12px;}

  /* Prices inputs */
  .tfo-account .price-input{width:78px;padding:4px 6px;font-size:12px;}

  /* Orders: hide less important columns on mobile to improve readability */
  .tfo-admin-panel--orders .widefat th:nth-child(1),
  .tfo-admin-panel--orders .widefat td:nth-child(1),
  .tfo-admin-panel--orders .widefat th:nth-child(7),
  .tfo-admin-panel--orders .widefat td:nth-child(7){display:none;}

  /* Vault: keep compact */
  .tfo-admin-panel--vault .widefat th:nth-child(4),
  .tfo-admin-panel--vault .widefat td:nth-child(4){display:none;}

/* Vault: fit to mobile width (3 columns only: product + available + toggle)
   Disable forced min-width so table does not waste space / require scroll. */
.tfo-admin-panel--vault .tfo-admin-table-scroll table{min-width:0;}

/* Allow product name to wrap (prevents huge empty columns) */
.tfo-admin-panel--vault .widefat th:nth-child(1),
.tfo-admin-panel--vault .widefat td:nth-child(1){white-space:normal !important;}

/* Smaller input on mobile */
.tfo-admin-panel--vault input.regular-text{
  width:92px;
  min-width:92px;
  padding:4px 6px;
  font-size:12px;
}

/* Smaller black/gold toggle on mobile */
.tfo-admin-panel--vault .tfo-buy-slider{width:38px;height:20px;}
.tfo-admin-panel--vault .tfo-buy-slider:before{width:14px;height:14px;left:3px;}
.tfo-admin-panel--vault .tfo-buy-switch input:checked + .tfo-buy-slider:before{transform:translate(16px,-50%);}
}

/* from templates/account-customers.php */
.tfo-account .tfo-customers-root .wrap > h1{display:none;}
.tfo-account .tfo-customers-root .wrap{padding-top:0;}
@media (max-width:700px){
  .tfo-account .widefat th,.tfo-account .widefat td{font-size:12px;padding:10px 8px;white-space:normal !important;word-break:break-word !important;}
}


/* Admin naming bridge inside account admin frontend */
.tfo-admin-panel .tfo-admin-page{margin:0;}
.tfo-admin-panel .tfo-admin-page-head{margin-bottom:14px;}
.tfo-admin-panel .tfo-admin-page-table-wrap{max-width:100%;overflow:auto;-webkit-overflow-scrolling:touch;}
.tfo-admin-panel .tfo-admin-page-panel{margin-bottom:14px;}
