/* Compact Billing row actions. UI-only: preserves all original buttons and click handlers. */
.desk-document-actions{
  position:relative;
  flex-wrap:nowrap;
  min-width:max-content;
}

/* Only the first three primary actions remain visible in the row. */
.desk-document-actions > .tg-secondary-billing-action{
  display:none!important;
}

.desk-document-actions > .tg-more-actions-toggle{
  display:inline-grid!important;
  place-items:center;
  min-width:30px!important;
  width:30px!important;
  height:28px!important;
  padding:0!important;
  border:1px solid color-mix(in srgb,var(--line) 78%,transparent)!important;
  border-radius:6px!important;
  background:color-mix(in srgb,#64748b 88%,var(--panel-solid))!important;
  color:#fff!important;
  font-size:18px!important;
  font-weight:900!important;
  line-height:1!important;
  letter-spacing:1px;
  cursor:pointer;
}

.desk-document-actions > .tg-more-actions-toggle::before{
  content:none!important;
}

.desk-document-actions > .tg-more-actions-toggle:hover{
  transform:translateY(-1px);
  filter:brightness(1.08);
  box-shadow:0 4px 12px rgba(0,0,0,.16);
}

.desk-document-actions > .tg-more-actions-toggle[aria-expanded="true"]{
  background:#334155!important;
  box-shadow:0 0 0 2px color-mix(in srgb,var(--blue) 28%,transparent);
}

/* Keep the sticky action column compact now that secondary actions are hidden. */
.billdesk-table th:last-child,
.billdesk-table td:last-child{
  min-width:172px;
  width:172px;
}

.tg-billing-action-popover{
  position:fixed;
  z-index:10000;
  width:238px;
  padding:7px;
  border:1px solid color-mix(in srgb,var(--line) 88%,transparent);
  border-radius:10px;
  background:var(--panel-solid,#fff);
  box-shadow:0 16px 42px rgba(15,23,42,.22);
  backdrop-filter:blur(8px);
}

.tg-billing-action-popover::before{
  content:"MORE ACTIONS";
  display:block;
  padding:5px 8px 7px;
  color:var(--muted,#64748b);
  font-size:10px;
  font-weight:800;
  letter-spacing:.08em;
}

.tg-billing-action-menu-item{
  width:100%;
  min-height:38px;
  display:grid;
  grid-template-columns:30px 1fr;
  align-items:center;
  gap:8px;
  border:0;
  border-radius:7px;
  background:transparent;
  color:var(--ink,#0f172a);
  padding:4px 8px;
  text-align:left;
  cursor:pointer;
}

.tg-billing-action-menu-item:hover:not(:disabled){
  background:color-mix(in srgb,var(--blue) 8%,var(--panel-solid));
}

.tg-billing-action-menu-item:disabled{
  opacity:.42;
  cursor:not-allowed;
}

.tg-billing-action-menu-icon{
  width:28px;
  height:28px;
  display:grid;
  place-items:center;
  border-radius:6px;
  background:color-mix(in srgb,var(--blue) 10%,var(--panel-solid));
  font-size:16px;
}

.tg-billing-action-menu-label{
  min-width:0;
  font-size:13px;
  font-weight:700;
  line-height:1.25;
  white-space:normal;
}

@media(max-width:720px){
  .desk-document-actions > .tg-more-actions-toggle{
    min-width:32px!important;
    width:32px!important;
    height:30px!important;
  }
  .billdesk-table th:last-child,
  .billdesk-table td:last-child{
    min-width:180px;
    width:180px;
  }
  .tg-billing-action-popover{
    width:min(238px,calc(100vw - 20px));
  }
}
