/* Zakupki v1.9.26 — second mobile polish pass. */

/* Dashboard filtering: leave room for the sticky phone header after the automatic jump. */
#liveResults{scroll-margin-top:118px}

/* Keep reply affordances visible and easy to hit. */
.v1916-reply-button,.v1916-file-reply,.v1919-photo-reply{
  font-size:19px!important;font-weight:900!important;line-height:1!important;
}

/* Voice cards: microphone aligns with the title; player occupies and centers in the useful width. */
.v1916-voice-card{
  display:grid!important;grid-template-columns:32px minmax(0,1fr) 30px;
  grid-template-areas:"voice-icon voice-main voice-reply";
  align-items:start!important;column-gap:8px!important;row-gap:4px!important;
}
.v1916-voice-card>.v1916-file-icon{grid-area:voice-icon;align-self:start!important;margin-top:0!important}
.v1916-voice-card>.v1916-file-meta{grid-area:voice-main;min-width:0;width:100%}
.v1916-voice-card>.v1916-file-reply{grid-area:voice-reply;align-self:start!important;justify-self:end;margin-left:0!important}
.v1916-voice-card .v1916-file-meta>strong{line-height:28px}
.v1916-voice-card audio{display:block;width:min(100%,330px)!important;max-width:100%!important;margin:3px auto 0}

@media (max-width:760px), (orientation:landscape) and (max-height:600px) and (max-width:1280px){
  /* Invoice deletion approval: remove the old 280px flex-basis that became empty vertical space. */
  .v1916-removal-decision{
    min-height:0!important;height:auto!important;padding:11px 12px!important;gap:10px!important;
    align-items:stretch!important;justify-content:flex-start!important;
  }
  .v1916-removal-decision>div:first-child{
    flex:0 0 auto!important;width:100%!important;min-height:0!important;
  }
  .v1916-removal-decision-buttons{
    width:100%!important;display:grid!important;grid-template-columns:1fr!important;gap:7px!important;
  }
  .v1916-removal-decision-buttons .btn{
    width:100%!important;min-height:42px!important;flex:0 0 auto!important;padding:9px 12px!important;
  }

  /* Request chat fits below the sticky site header instead of filling the whole viewport. */
  #discussion{scroll-margin-top:118px}
  #discussion.v1916-chat-section{overflow:visible!important}
  .v1916-chat-feed{
    min-height:220px!important;
    max-height:min(46dvh,420px)!important;
    padding:10px!important;gap:8px!important;
    overscroll-behavior-y:contain;
  }
  .v1916-chat-compose{margin-top:8px!important;padding:7px!important}
  .v1916-compose-main{gap:4px!important}
  .v1916-compose-main textarea{min-width:0!important;padding-left:4px!important;padding-right:4px!important;font-size:15px!important}
  .v1916-compose-main textarea::placeholder{font-size:12px!important;letter-spacing:-.1px}
  .v1916-reply-button,.v1916-file-reply,.v1919-photo-reply{font-size:20px!important;font-weight:900!important;padding:4px 6px!important}
  .v1916-voice-card{grid-template-columns:30px minmax(0,1fr) 30px;padding:7px 8px!important}
  .v1916-voice-card>.v1916-file-icon{width:28px!important;height:28px!important}
  .v1916-voice-card .v1916-file-meta>strong{font-size:12px!important;line-height:28px}
  .v1916-voice-card audio{height:34px!important;width:min(100%,300px)!important;margin:2px auto 0}
}

/* Portrait phone: transform the positions table into readable cards. */
@media (orientation:portrait) and (max-width:680px){
  #items .panel-header{align-items:flex-start!important;gap:10px!important}
  #items .panel-header>div{min-width:0}
  #items .panel-header h2{font-size:20px!important;line-height:1.22!important}
  #items .progress-number{flex:0 0 auto;white-space:nowrap;font-size:11px!important;padding:5px 8px!important}
  #items .v194-table-wrap{overflow:visible!important;margin-top:10px}
  #items .v194-table,
  #items .v194-table tbody{display:block!important;width:100%!important;min-width:0!important}
  #items .v194-table colgroup,
  #items .v194-table thead{display:none!important}
  #items .v194-table tr{
    display:block!important;width:100%!important;min-width:0!important;
    margin:0 0 10px!important;padding:10px 12px!important;
    border:1px solid var(--border)!important;border-radius:12px!important;background:var(--white)!important;
    box-sizing:border-box!important;
  }
  #items .v194-table td{
    display:grid!important;grid-template-columns:minmax(0,44%) minmax(0,56%);align-items:center;gap:8px!important;
    width:100%!important;min-width:0!important;box-sizing:border-box!important;
    padding:7px 0!important;border:0!important;border-bottom:1px solid var(--border)!important;
    text-align:right!important;white-space:normal!important;
  }
  #items .v194-table td:last-child{border-bottom:0!important;padding-bottom:1px!important}
  #items .v194-table td::before{
    content:attr(data-mobile-label);display:block;min-width:0;text-align:left;
    color:var(--muted);font-size:11px;font-weight:750;line-height:1.25;text-transform:none;
  }
  #items .v194-table .v194-item-name{
    display:block!important;text-align:left!important;padding-top:2px!important;padding-bottom:10px!important;
  }
  #items .v194-table .v194-item-name::before{margin-bottom:5px}
  #items .v194-table .v194-item-name strong{display:block;font-size:15px;line-height:1.3;overflow-wrap:anywhere}
  #items .v194-table .v194-item-name .subfield{margin-top:4px;font-size:11px;overflow-wrap:anywhere}
  #items .v194-shipping-cell>*{justify-self:end;max-width:100%}
  #items .v197-date-combined{display:flex!important;justify-content:flex-end!important;align-items:center!important;gap:6px!important;flex-wrap:wrap!important}
  #items .v197-date-combined input[type="date"]{max-width:150px!important;min-width:0!important}
  #items .v194-work-label{white-space:nowrap}
  #items .v194-progress-cell{grid-template-columns:minmax(0,44%) minmax(0,56%)!important}
  #items .v194-progress-cell .progress-line{width:100%!important;min-width:70px!important;margin:0!important}
  #items .v194-progress-cell small{grid-column:2;text-align:right;margin-top:-2px}
  #items .v1923-pto-qty-cell{justify-self:end!important;max-width:130px!important}
  #items .v1923-pto-qty-input{max-width:110px!important;text-align:right!important}
  #items .v197-remove-cell>*{justify-self:end}
}

/* Very narrow phones need extra room in the composer. */
@media (max-width:390px){
  .v1916-compose-icon.v1918-compose-tool{width:36px!important;height:36px!important;flex-basis:36px!important;padding:7px!important}
  .v1916-send-button{width:38px!important;height:38px!important;flex-basis:38px!important}
  .v1916-compose-main textarea::placeholder{font-size:11px!important}
}
