/* TMA Quotations UI v19: finalize reasons, costing cards on phones, phone stepper, activity rows, phone filters */

/* 1. Why Finalize is blocked */
.tma-block{margin:0 0 14px;padding:12px 14px;border:1px solid rgba(180,35,24,.35);background:#FEF3F2;border-radius:8px;font-size:14px;line-height:1.5;color:#23192B}
.tma-block-title{font-weight:700;color:#B42318;margin-bottom:4px}
.tma-block-list{margin:0;padding-left:18px;list-style:disc}
.tma-block-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.tma-row-err{margin-top:4px;padding:0 6px;font-size:12px;line-height:1.4;color:#B42318}

/* 2. Costing tables: the 170px minimum only on phones (it cut "Client value" on 1366px laptops) */
.tma-minw-pricing{min-width:155px}
.tma-minw-pricing + td{min-width:165px!important}
@media (max-width:767px){
  table.tma-cards>thead{display:none}
  table.tma-cards,table.tma-cards>tbody,table.tma-cards>tbody>tr,table.tma-cards>tbody>tr>td{display:block;width:100%!important;min-width:0!important;max-width:none!important}
  table.tma-cards>tbody>tr{border:1px solid #E3DCE8;border-radius:8px;padding:10px 12px;margin-bottom:10px;background:#fff}
  table.tma-cards>tbody>tr>td{border:0!important;padding:4px 0!important;text-align:left!important}
  table.tma-cards>tbody>tr>td[data-label]::before{content:attr(data-label);display:block;font-size:12px;font-weight:600;color:#6B6276;margin-bottom:2px}
  table.tma-cards>tbody>tr>td:empty{display:none}
  table.tma-cards>tbody>tr>td>select,table.tma-cards>tbody>tr>td>input{width:100%!important}
  table.tma-cards>tbody>tr>td.num{text-align:left!important}
  table.tma-cards>tbody>tr>td table:not(.tma-cards){display:table;width:100%}
  table.tma-cards table.tma-cards>tbody>tr{background:#F6F4F8}
  table.tma-cards>tbody>tr>td .overflow-x-auto,table.tma-cards>tbody>tr>td:has(> table){overflow-x:auto}
  table.tma-cards .tma-remove{min-height:44px;padding:0 10px;border:1px solid #DDD6E3;border-radius:6px;display:inline-flex;align-items:center;gap:6px}
  table.tma-cards .tma-remove::after{content:"Remove";font-size:13px;font-weight:600}
  .overflow-x-auto:has(> table.tma-cards){overflow:visible}
}

/* 3. Phone stepper */
.tma-steps-phone{display:none}
@media (max-width:767px){
  .tma-steps-desk{display:none!important}
  .tma-steps-phone{display:block;margin:0 0 16px}
  .tma-steps-row{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:8px}
  .tma-steps-row>:first-child{justify-self:start}
  .tma-steps-row>:last-child{justify-self:end}
  .tma-step-btn{min-height:44px;white-space:nowrap}
  .tma-steps-now{text-align:center}
  .tma-steps-count{font-size:12px;font-weight:600;color:#6B6276}
  .tma-steps-name{font-size:16px;font-weight:700;color:#23192B}
  .tma-steps-bar{display:grid;grid-template-columns:repeat(4,1fr);gap:4px;margin-top:6px}
  .tma-steps-seg{height:24px;padding:9px 0;border:0;background:none;cursor:pointer}
  .tma-steps-seg::before{content:"";display:block;height:6px;border-radius:3px;background:#E3DCE8}
  .tma-steps-seg.done::before{background:#603060}
  .tma-steps-seg.now::before{background:#AD1F68}
}

/* 4. Dashboard activity: the whole row opens the quotation; company keeps its own target */
.tma-act-row{position:relative;min-height:44px}
.tma-act-row:hover{background:#F6F4F8}
.tma-act-row a::after{content:"";position:absolute;inset:0}
.tma-act-row button{position:relative;z-index:1;min-height:32px;padding:4px 6px;margin:-4px -6px;border-radius:6px}

/* Touch: "Add tag / equipment …" text buttons and switch rows big enough to tap */
@media (pointer:coarse){
  button.inline-flex.text-plum{min-height:44px}
  label:has(> [role=switch]){min-height:44px}
}

/* 5. Phone filters (Clients) and Masters section picker */
.tma-phone-only{display:none}
.tma-filter-set{display:contents}
@media (max-width:767px){
  .tma-phone-only{display:inline-flex}
  .tma-filter-btn{min-height:44px}
  .tma-filter-set{display:none}
  .tma-filter-set.is-open{display:contents}
}
.tma-below-lg{display:none}
@media (max-width:1023px){
  .tma-below-lg{display:block;min-height:44px}
  .tma-lg-only{display:none}
}
