/* Sfera Opportunities 1.138.0 — edit drawer alignment & workspace finish.
   Active after opportunity-studio-v4.css. Preserve the dashboard's approved colors. */

/* The form is a real single right drawer. Neutralize the old two-column
   desk layout (sticky picker + grid-column:2) at the ID scoped level. */
#opportunity-form-dialog.opp-desk-dialog{
  position:fixed!important;
  inset:0!important;
  display:flex!important;
  align-items:stretch!important;
  justify-content:flex-end!important;
  padding:0!important;
  overflow:hidden!important;
}
#opportunity-form-dialog.opp-desk-dialog[hidden],
#opportunity-form-dialog.opp-desk-dialog #opportunity-form[hidden]{
  display:none!important;
}
#opportunity-form-dialog.opp-desk-dialog #opportunity-form.opportunity-dialog__panel{
  position:relative!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  justify-content:flex-start!important;
  box-sizing:border-box!important;
  width:min(600px,100vw)!important;
  min-width:0!important;
  max-width:100vw!important;
  height:100dvh!important;
  min-height:0!important;
  max-height:100dvh!important;
  margin:0!important;
  padding:0!important;
  background:#fff!important;
  border:0!important;
  border-left:1px solid #dbe6f5!important;
  border-radius:0!important;
  overflow:hidden!important;
  box-shadow:-16px 0 44px rgba(14,33,102,.15)!important;
  contain:layout;
}
#opportunity-form-dialog.opp-desk-dialog #opportunity-form>header{
  flex:0 0 auto!important;
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  display:flex!important;
  justify-content:space-between!important;
  align-items:center!important;
  gap:12px!important;
  padding:20px 23px!important;
  margin:0!important;
  border-bottom:1px solid #e5edf8!important;
  background:#fff!important;
}
#opportunity-form-dialog.opp-desk-dialog #opportunity-form>header>div{
  min-width:0!important;
  flex:1!important;
  text-align:left!important;
  margin:0!important;
}
#opportunity-form-dialog.opp-desk-dialog #opportunity-form-title{
  text-align:left!important;
  font:650 20px/1.3 Poppins,"Open Sans",sans-serif!important;
  color:#0e2166!important;
  letter-spacing:-.035em!important;
}
#opportunity-form-dialog.opp-desk-dialog #opportunity-form .opportunity-dialog__body.s5-form-body{
  position:relative!important;
  box-sizing:border-box!important;
  flex:1 1 auto!important;
  display:block!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  min-height:0!important;
  height:auto!important;
  margin:0!important;
  padding:19px 20px 28px!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  grid-template-columns:none!important;
  grid-template-rows:none!important;
  align-items:stretch!important;
  justify-items:stretch!important;
  background:#f8fafd!important;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
}
#opportunity-form-dialog.opp-desk-dialog #opportunity-form .s5-form-flow{
  box-sizing:border-box!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  gap:14px!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  margin:0!important;
  padding:0!important;
  grid-column:auto!important;
  grid-row:auto!important;
  position:static!important;
}
#opportunity-form-dialog.opp-desk-dialog #opportunity-form :is(.opportunity-customer-picker,.opp-desk-form-section){
  position:relative!important;
  inset:auto!important;
  top:auto!important;
  right:auto!important;
  bottom:auto!important;
  left:auto!important;
  transform:none!important;
  translate:none!important;
  grid-column:auto!important;
  grid-row:auto!important;
  align-self:stretch!important;
  justify-self:stretch!important;
  box-sizing:border-box!important;
  display:block!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  margin:0!important;
  padding:20px!important;
  border:1px solid #e0e9f5!important;
  border-radius:14px!important;
  background:#fff!important;
  box-shadow:0 5px 17px rgba(19,58,103,.045)!important;
  animation:s5-card-enter .31s ease-out both;
}
#opportunity-form-dialog.opp-desk-dialog #opportunity-form .opp-desk-form-section:nth-of-type(2){animation-delay:35ms}
#opportunity-form-dialog.opp-desk-dialog #opportunity-form .opp-desk-form-section:nth-of-type(3){animation-delay:65ms}
#opportunity-form-dialog.opp-desk-dialog #opportunity-form .opp-desk-form-section:nth-of-type(4){animation-delay:95ms}
#opportunity-form-dialog.opp-desk-dialog #opportunity-form :is(.opportunity-customer-picker,.opp-desk-form-section)>h4{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  min-height:18px!important;
  margin:0 0 13px!important;
  color:#23436e!important;
  font:650 12px/1.4 Poppins,"Open Sans",sans-serif!important;
  letter-spacing:-.013em!important;
}
#opportunity-form-dialog.opp-desk-dialog #opportunity-form .opp-desk-form-section>h4::before{
  flex:none!important;
  width:7px!important;
  height:7px!important;
  margin:0!important;
  border-radius:50%!important;
  background:#3b78eb!important;
}
#opportunity-form-dialog.opp-desk-dialog #opportunity-form .opportunity-customer-picker>h4::before{
  content:"";
  display:inline-block;
  flex:none;
  width:7px;height:7px;
  border-radius:50%;
  background:#8daffc;
}
#opportunity-form-dialog.opp-desk-dialog #opportunity-form .opportunity-customer-picker>p{
  color:#7e93ad!important;
  font-size:10px!important;
  line-height:1.6!important;
  margin:0 0 13px!important;
}
#opportunity-form-dialog.opp-desk-dialog #opportunity-form .opportunity-customer-picker>div:first-of-type{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  grid-auto-flow:row!important;
  gap:12px!important;
  align-items:end!important;
  width:100%!important;
  min-width:0!important;
}
#opportunity-form-dialog.opp-desk-dialog #opportunity-form #opportunity-customer-find{
  grid-column:1/-1!important;
  width:100%!important;
  min-height:38px!important;
  margin:0!important;
  border:1px solid #d9e5f6!important;
  background:#f3f7fd!important;
  color:#315f9e!important;
  box-shadow:none!important;
  transition:border-color .15s,background .15s!important;
}
#opportunity-form-dialog.opp-desk-dialog #opportunity-form #opportunity-customer-find:not(:disabled):hover{
  background:#eaf3ff!important;border-color:#9cc1f5!important;
}
#opportunity-form-dialog.opp-desk-dialog #opportunity-form .opp-desk-form-fields{
  display:grid!important;
  box-sizing:border-box!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  align-items:start!important;
  justify-items:stretch!important;
  gap:14px!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  margin:0!important;
}
#opportunity-form-dialog.opp-desk-dialog #opportunity-form :is(.opp-desk-form-fields,.opportunity-customer-picker)>label,
#opportunity-form-dialog.opp-desk-dialog #opportunity-form .opp-desk-form-fields>label,
#opportunity-form-dialog.opp-desk-dialog #opportunity-form .opportunity-customer-picker>div:first-of-type>label{
  box-sizing:border-box!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  justify-self:stretch!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  margin:0!important;
  padding:0!important;
  grid-column:auto!important;
  color:#58718f!important;
  font:600 11px/1.5 "Open Sans",sans-serif!important;
}
#opportunity-form-dialog.opp-desk-dialog #opportunity-form .opp-desk-form-fields>label:has(#opportunity-description){
  grid-column:1/-1!important;
}
#opportunity-form-dialog.opp-desk-dialog #opportunity-form .opp-desk-form-fields>label :is(input,select,textarea),
#opportunity-form-dialog.opp-desk-dialog #opportunity-form .opportunity-customer-picker :is(input,select){
  box-sizing:border-box!important;
  display:block!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  margin-top:6px!important;
  min-height:42px!important;
  padding:10px 11px!important;
  border:1px solid #dce6f4!important;
  border-radius:9px!important;
  background:#fbfcff!important;
  color:#28456c!important;
  font:500 12px/1.4 "Open Sans",sans-serif!important;
  transition:background .15s,border-color .15s,box-shadow .15s!important;
}
#opportunity-form-dialog.opp-desk-dialog #opportunity-form .opp-desk-form-fields>label textarea{
  min-height:106px!important;
  resize:vertical!important;
}
#opportunity-form-dialog.opp-desk-dialog #opportunity-form .opp-desk-form-fields>label :is(input,select,textarea):focus,
#opportunity-form-dialog.opp-desk-dialog #opportunity-form .opportunity-customer-picker :is(input,select):focus{
  border-color:#3b78eb!important;
  background:#fff!important;
  box-shadow:0 0 0 3px rgba(59,120,235,.10)!important;
  outline:none!important;
}
#opportunity-form-dialog.opp-desk-dialog #opportunity-form #opportunity-form-state{
  flex:none!important;
  margin:0!important;
  padding:0 2px!important;
  text-align:left!important;
  font-size:11px!important;
}
#opportunity-form-dialog.opp-desk-dialog #opportunity-form>footer{
  flex:0 0 auto!important;
  display:flex!important;
  justify-content:flex-end!important;
  align-items:center!important;
  gap:9px!important;
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  padding:14px 20px calc(14px + env(safe-area-inset-bottom))!important;
  margin:0!important;
  border-top:1px solid #e5edf8!important;
  background:#fff!important;
}
#opportunity-form-dialog.opp-desk-dialog #opportunity-form>footer button{
  flex:none!important;
  min-height:40px!important;
  border-radius:9px!important;
  font-size:11px!important;
  transition:background .15s,border-color .15s,box-shadow .15s!important;
}
#opportunity-form-dialog.opp-desk-dialog #opportunity-form>footer button[type="submit"]{
  background:#3b78eb!important;
  color:#fff!important;
  border-color:#3b78eb!important;
  box-shadow:0 3px 10px rgba(59,120,235,.13)!important;
}
#opportunity-form-dialog.opp-desk-dialog #opportunity-form>footer button[type="submit"]:hover{
  background:#2c69d4!important;border-color:#2c69d4!important;
}
#opportunity-form-dialog.opp-desk-dialog #opportunity-form .opportunity-form-grid{display:none!important}
#opportunity-view[data-studio="v4"] .s4-workspace{
  border-color:#e1eaf5!important;
  box-shadow:0 7px 20px rgba(25,55,105,.045)!important;
}
#opportunity-view[data-studio="v4"] #opportunity-management-pane :is(.opportunity-results-head,.opp-desk-list-labels){
  display:none!important;
}
#opportunity-view[data-studio="v4"] #opportunity-management-pane>.s4-table-head{padding-top:10px!important}
#opportunity-view[data-studio="v4"] #opportunity-results .opportunity-card.s4-row{
  outline-offset:-2px;
}
#opportunity-view[data-studio="v4"] #opportunity-results .opportunity-card.s4-row:hover{
  background:#f7faff!important;
  box-shadow:none!important;
}
#opportunity-view[data-studio="v4"] #opportunity-results .opportunity-card.s4-row:focus-visible{
  outline:2px solid #3b78eb!important;
  background:#f4f8ff!important;
}
#opportunity-view[data-studio="v4"] .s4-card:hover{
  border-color:#d7e4f4!important;
  box-shadow:0 8px 22px rgba(25,55,105,.065)!important;
}
/* Small touch layouts and mobile browsers requesting desktop sites. */
@media (max-width:760px){
  #opportunity-form-dialog.opp-desk-dialog #opportunity-form.opportunity-dialog__panel{width:100vw!important;}
  #opportunity-form-dialog.opp-desk-dialog #opportunity-form>header{padding:17px 16px!important}
  #opportunity-form-dialog.opp-desk-dialog #opportunity-form .opportunity-dialog__body.s5-form-body{padding:13px 12px 24px!important}
  #opportunity-form-dialog.opp-desk-dialog #opportunity-form :is(.opportunity-customer-picker,.opp-desk-form-section){padding:15px!important}
  #opportunity-form-dialog.opp-desk-dialog #opportunity-form>footer{padding:11px 12px calc(11px + env(safe-area-inset-bottom))!important}
}
@media (max-width:460px){
  #opportunity-form-dialog.opp-desk-dialog #opportunity-form .opp-desk-form-fields{grid-template-columns:minmax(0,1fr)!important}
  #opportunity-form-dialog.opp-desk-dialog #opportunity-form .opp-desk-form-fields>label:has(#opportunity-description){grid-column:1!important}
  #opportunity-form-dialog.opp-desk-dialog #opportunity-form .opportunity-customer-picker>div:first-of-type{grid-template-columns:minmax(0,1fr)!important}
  #opportunity-form-dialog.opp-desk-dialog #opportunity-form #opportunity-customer-find{grid-column:1!important}
}
@keyframes s5-card-enter{
  from{opacity:.6;transform:translateY(6px)}
  to{opacity:1;transform:translateY(0)}
}
@media(prefers-reduced-motion:reduce){
  #opportunity-form-dialog.opp-desk-dialog .s5-form-flow *,
  #opportunity-view[data-studio="v4"] .s4-workspace *{
    animation:none!important;
    transition:none!important;
  }
}

/* Legacy, decorative list section headings have no place in the unified tabs. */
#opportunity-view[data-studio="v4"] #opportunity-management-pane > :is(h1,h2,h3,.opportunity-pane__header){
  display:none!important;
}
/* "Desktop site" on a phone often reports a wide layout viewport. Preserve
   the requested title-free mobile topbar using touch capabilities as a hint. */
@media (hover:none) and (pointer:coarse){
  #signed-in.app-shell:has(#opportunity-view:not([hidden])) .opp-desk-topbar h1{
    display:none!important;
  }
}
