/* ======================================================================
   UA adapter: subscribers_edit.php
   Pagewise rule:
   - Visual decisions are NOT here. They live in ua_program_unified.css
     under the ua-form-* contract.
   - This file only arranges the edit page and protects it from legacy
     sa-* structure by using the new ua-form-* markup.
   ====================================================================== */

.ua-edit-contract-page .ua-form-shell{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding:0!important;
}

.ua-edit-contract-page .ua-form-layout{
  display:flex!important;
  flex-direction:row!important;
  direction:rtl!important;
  align-items:flex-start!important;
  width:100%!important;
  gap:16px!important;
}

.ua-edit-contract-page .ua-form-main{
  flex:1 1 auto!important;
  min-width:0!important;
  display:flex!important;
  flex-direction:column!important;
  gap:16px!important;
}

.ua-edit-contract-page .ua-form-preview{
  flex:0 0 360px!important;
  width:360px!important;
  min-width:0!important;
  position:sticky!important;
  top:0!important;
  display:flex!important;
  flex-direction:column!important;
  gap:16px!important;
}

.ua-edit-contract-page .ua-form-grid{
  display:grid!important;
  gap:12px!important;
  width:100%!important;
  min-width:0!important;
}

.ua-edit-contract-page .ua-edit-personal-grid,
.ua-edit-contract-page .ua-edit-service-grid,
.ua-edit-contract-page .ua-edit-pppoe-grid,
.ua-edit-contract-page .ua-edit-upload-grid{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
}

.ua-edit-contract-page .ua-form-field.is-span-2{grid-column:span 2!important;}
.ua-edit-contract-page .ua-form-field.is-full{grid-column:1/-1!important;}

.ua-edit-contract-page .ua-subscriber-serial-field{
  padding:12px!important;
  border:1px solid rgba(250,190,35,.28)!important;
  border-radius:12px!important;
  background:rgba(250,190,35,.045)!important;
}
.ua-edit-contract-page .ua-subscriber-serial-field .ua-form-control{
  direction:ltr!important;
  text-align:left!important;
  font-weight:800!important;
  letter-spacing:.04em!important;
}
.ua-edit-contract-page .ua-subscriber-serial-help{
  display:block!important;
  margin-top:7px!important;
  color:#91a6bd!important;
  font-size:11px!important;
  line-height:1.65!important;
}
.ua-edit-contract-page .ua-subscriber-serial-help b{color:#fabe23!important;}

.ua-edit-contract-page .ua-form-inline-control{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 34px!important;
  gap:8px!important;
  align-items:center!important;
}

.ua-edit-contract-page .ua-form-inline-control .se-ip-suggest-btn{
  width:34px!important;
  min-width:34px!important;
  height:34px!important;
  min-height:34px!important;
  padding:0!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
}

.ua-edit-contract-page .se-inline-hidden-hint{display:none!important;}

.ua-edit-contract-page .ua-form-actions{
  direction:rtl!important;
  align-items:stretch!important;
  justify-content:stretch!important;
  gap:12px!important;
}
.ua-edit-contract-page .ua-form-actions.ua-form-actions--pair{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  width:100%!important;
}

body.ua-subscriber-modal-embed .ua-edit-contract-page .content{padding:14px!important;}
body.ua-subscriber-modal-embed .ua-edit-contract-page .ua-form-layout{gap:10px!important;}
body.ua-subscriber-modal-embed .ua-edit-contract-page .ua-form-main{gap:10px!important;}
body.ua-subscriber-modal-embed .ua-edit-contract-page .ua-form-preview{flex-basis:320px!important;width:320px!important;gap:10px!important;}
body.ua-subscriber-modal-embed .ua-edit-contract-page .ua-form-grid{gap:10px!important;}

@media(max-width:920px){
  .ua-edit-contract-page .ua-form-layout{flex-direction:column!important;}
  .ua-edit-contract-page .ua-form-preview{position:relative!important;top:auto!important;width:100%!important;flex:1 1 auto!important;}
}

@media(max-width:760px){
  .ua-edit-contract-page .ua-edit-personal-grid,
  .ua-edit-contract-page .ua-edit-service-grid,
  .ua-edit-contract-page .ua-edit-pppoe-grid,
  .ua-edit-contract-page .ua-edit-upload-grid{grid-template-columns:1fr!important;}
  .ua-edit-contract-page .ua-form-field.is-span-2{grid-column:1/-1!important;}
}

/* actions placement only; visual contract is in ua_program_unified.css */
.ua-edit-contract-page .ua-edit-action-panel{
  align-self:stretch!important;
}
.ua-agent-edit-contract-box{margin:0 0 14px;padding:14px;border:1px solid rgba(250,190,35,.4);border-radius:15px;background:#0d1d32;color:#eaf2ff}
.ua-agent-edit-contract-box .ap-card-title{display:flex;gap:10px;align-items:center}.ua-agent-edit-contract-box .ap-card-title>i{color:#fabe23;font-size:20px}
.ua-agent-edit-contract-box h2{font-size:17px;margin:0}.ua-agent-edit-contract-box p{margin:3px 0 0;color:#91a6bd;font-size:12px}
.ua-agent-edit-contract-box .ap-contract-print-form{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:12px}
.ua-agent-edit-contract-box .ap-contract-print-form>label{display:flex;gap:9px;padding:11px;border:1px solid #28405c;border-radius:11px;background:#0a1728}
.ua-agent-edit-contract-box .ap-contract-print-form>label:has(input:checked){border-color:#fabe23;background:rgba(250,190,35,.07)}
.ua-agent-edit-contract-box .ap-contract-print-form span{display:flex;flex-direction:column}.ua-agent-edit-contract-box .ap-contract-print-form small{color:#8fa4bc}
.ua-agent-edit-contract-box .ap-contract-template-name,.ua-agent-edit-contract-box .ap-contract-print-actions{grid-column:1/-1}
.ua-agent-edit-contract-box .ap-contract-print-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px}.ua-agent-edit-contract-box .ap-contract-print-actions .btn{width:100%}
@media(max-width:720px){.ua-agent-edit-contract-box .ap-contract-print-form{grid-template-columns:1fr}}
@media(max-width:520px){.ua-agent-edit-contract-box .ap-contract-print-actions{grid-template-columns:1fr}}
