/* Desktop form alignment. All server controls remain in their original DOM/naming containers. */
html[dir="ltr"] { direction:ltr!important; }
html[dir="rtl"] { direction:rtl!important; }
@media screen and (min-width:701px) {
  body.portal-site.portal-form .portal-field-grid {
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr));
    align-items:start;
    gap:22px 28px;
    width:100%!important;
    max-width:none!important;
    padding:0!important;
  }
  body.portal-site.portal-form .portal-field-grid > :not(.portal-field-row) { grid-column:1/-1; }
  body.portal-site.portal-form .portal-field-row,
  body.portal-site.portal-form .portal-field-group { display:contents!important; }
  body.portal-site.portal-form :is(.portal-field-grid,.portal-field-group,.portal-field-row)[style*="display: none"],
  body.portal-site.portal-form :is(.portal-field-grid,.portal-field-group,.portal-field-row)[style*="display:none"],
  body.portal-site.portal-form :is(.portal-field-grid,.portal-field-group,.portal-field-row)[hidden] { display:none!important; }
  body.portal-site.portal-form .portal-field-dormant:not(:has(input:not([hidden]),select,textarea)) { display:none!important; }
  body.portal-site.portal-form .portal-field,
  body.portal-site.portal-form .div-row,
  body.portal-site.portal-form .div-row > .div-row {
    display:block!important;
    float:none!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    margin:0!important;
    padding:0!important;
    justify-self:stretch;
    align-self:start;
    text-align:start!important;
  }
  body.portal-site.portal-form .portal-spacer { display:none!important; }
  body.portal-site.portal-form .portal-field-wide { grid-column:1/-1; }
  body.portal-site.portal-form .div-row > span[data-portal-text],
  body.portal-site.portal-form .div-row > span:has(> [data-portal-text]),
  body.portal-site.portal-form .labelReq {
    display:block!important;
    float:none!important;
    width:100%!important;
    max-width:none!important;
    min-height:36px!important;
    margin:0 0 7px!important;
    color:#515c75!important;
    font-size:26px!important;
    line-height:1.35!important;
    text-align:start!important;
  }
  body.portal-site.portal-form .labelReq :is(span,label,b,small) {
    float:none!important;
    font-size:inherit!important;
    line-height:inherit!important;
    letter-spacing:normal!important;
  }
  body.portal-site.portal-form :is(input[type="text"],input[type="email"],input[type="number"],input[type="tel"],input[type="password"],input[type="date"],select,textarea) {
    display:block;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    float:none!important;
    margin:0!important;
    border:1px solid #cfd7e5!important;
    border-radius:8px!important;
    background:#fcfdff!important;
    font-size:26px!important;
    padding:10px 13px!important;
    min-height:48px!important;
    line-height:1.3!important;
  }
  body.portal-site.portal-form textarea { min-height:100px!important; resize:vertical; }
  body.portal-site.portal-form :is(input,select,textarea):focus {
    border-color:#737bb0!important;
    box-shadow:0 0 0 3px #2d2e8010!important;
  }
  body.portal-site.portal-form .form-body-wrapper { padding:26px 28px!important; }
  body.portal-site.portal-form .form-header { padding:19px 28px!important; }
  body.portal-site.portal-form .form-action { display:flex!important; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:10px; }
  body.portal-site.portal-page-ApplyPassport .separated-row { align-items:start; gap:24px 28px!important; }
  body.portal-site.portal-page-ApplyPassport .separated-item { max-width:none!important; }
  body.portal-site.portal-page-ApplyPassport .dual-label { min-height:36px!important; font-size:26px!important; margin-bottom:7px!important; }
  body.portal-site.portal-page-ApplyPassport .dual-label > span { font-size:inherit!important; line-height:inherit!important; }
  body.portal-site.portal-page-ApplyPassport .phone-input-container { display:grid!important; grid-template-columns:minmax(0,1fr) 85px; gap:10px; }
  body.portal-site.portal-form .tri-column { display:grid!important; grid-template-columns:repeat(3,minmax(0,1fr)); gap:22px; width:100%!important; }
}
/* Script-generated calendars, hidden controls and cropper visibility use their existing rules. */
body.portal-site.portal-form .englishField :is(input,textarea),
body.portal-site.portal-page-ApplyPassport .english-input { direction:ltr!important; text-align:left!important; }
@media (prefers-reduced-motion:reduce) {
  body.portal-site.portal-form :is(input,select,textarea) { transition:none!important; }
}
@media screen and (min-width:701px) {
  body.portal-site.portal-form .labelReq,
  body.portal-site.portal-form .div-row > span[data-portal-text],
  body.portal-site.portal-form .div-row > span:has(> [data-portal-text]) {
    height:auto!important;
    padding:0!important;
    min-height:36px!important;
    margin:0 0 7px!important;
    vertical-align:top!important;
  }
  body.portal-site.portal-form .div-row > span[data-portal-text] *,
  body.portal-site.portal-form .div-row > span:has(> [data-portal-text]) * {
    font-size:inherit!important;
    line-height:inherit!important;
  }
}
@media screen and (min-width:701px) {
  body.portal-site.portal-form .div-row[hidden],
  body.portal-site.portal-form .div-row[style*="display: none"],
  body.portal-site.portal-form .div-row[style*="display:none"] { display:none!important; }
}
@media screen and (min-width:701px) {
  body.portal-site.portal-form .labelReq,
  body.portal-site.portal-form .div-row > span[data-portal-text],
  body.portal-site.portal-form .div-row > span:has(> [data-portal-text]) {
    display:flex!important;
    align-items:center;
    gap:6px;
  }
  body.portal-site.portal-form .labelReq span,
  body.portal-site.portal-form .div-row > span[data-portal-text] span,
  body.portal-site.portal-form .div-row > span:has(> [data-portal-text]) span {
    display:inline!important;
    padding:0!important;
    margin:0!important;
    min-height:0!important;
    position:static!important;
    vertical-align:baseline!important;
  }
}
