/* V84 — inline vehicle-type selector + system-controlled field visibility + settings polish. */

/* The V51 selector used to float at the bottom/right of the viewport. V84 places
   the SAME control inside the vehicle form, immediately above "نوع السيارة/الدراجة". */
#v51-vehicle-type.v84-inline-vehicle-type{
  position:relative!important;
  inset:auto!important;
  right:auto!important;
  left:auto!important;
  top:auto!important;
  bottom:auto!important;
  z-index:2!important;
  width:100%!important;
  max-width:none!important;
  min-height:0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:14px!important;
  grid-column:1 / -1!important;
  margin:0 0 2px!important;
  padding:13px 14px!important;
  border:1px solid rgba(239,29,45,.30)!important;
  border-radius:16px!important;
  background:linear-gradient(135deg,rgba(239,29,45,.075),rgba(17,23,32,.88))!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
}
#v51-vehicle-type.v84-inline-vehicle-type>div:first-child{
  min-width:0!important;
  display:grid!important;
  gap:3px!important;
  text-align:right!important;
}
#v51-vehicle-type.v84-inline-vehicle-type b{
  font-size:12px!important;
  font-weight:950!important;
  color:#f5f7fa!important;
}
#v51-vehicle-type.v84-inline-vehicle-type [data-v51-note]{
  max-width:none!important;
  font-size:9px!important;
  line-height:1.6!important;
  color:#8f99a8!important;
}
#v51-vehicle-type.v84-inline-vehicle-type .v51-segment{
  flex:0 0 auto!important;
  display:flex!important;
  gap:3px!important;
  padding:3px!important;
  border:1px solid rgba(255,255,255,.06)!important;
  border-radius:12px!important;
  background:#202631!important;
}
#v51-vehicle-type.v84-inline-vehicle-type .v51-segment button{
  min-width:78px!important;
  padding:8px 11px!important;
  border-radius:9px!important;
  color:#c5ccd6!important;
  font-size:11px!important;
}
#v51-vehicle-type.v84-inline-vehicle-type .v51-segment button.is-active{
  background:#ef1d2d!important;
  color:#fff!important;
  box-shadow:0 5px 16px rgba(239,29,45,.22)!important;
}

/* A disabled system option must remove the field from the actual form, not just
   make the label say "اختياري". JS also disables its form controls. */
.v84-setting-hidden{
  display:none!important;
}

/* System page — more compact, consistent admin styling. */
#v80-system-page[data-v84-system="1"].v83-system-embedded .v80-system-shell{
  width:100%!important;
  max-width:1220px!important;
  margin:0 auto!important;
  padding:14px 4px calc(30px + env(safe-area-inset-bottom))!important;
}
#v80-system-page[data-v84-system="1"] .v80-system-head{
  align-items:center!important;
  padding:10px 6px 18px!important;
  margin-bottom:0!important;
}
#v80-system-page[data-v84-system="1"] .v80-system-head h1{
  margin:5px 0 4px!important;
  font-size:24px!important;
}
#v80-system-page[data-v84-system="1"] .v80-system-head p{
  max-width:760px!important;
  font-size:11px!important;
  line-height:1.75!important;
}
#v80-system-page[data-v84-system="1"] .v80-system-grid{
  align-items:start!important;
  gap:14px!important;
  padding:14px 0!important;
}
#v80-system-page[data-v84-system="1"] .v80-system-card{
  align-self:start!important;
  height:auto!important;
  min-height:0!important;
  padding:16px!important;
  border-radius:18px!important;
  background:linear-gradient(180deg,rgba(19,25,34,.98),rgba(13,18,25,.98))!important;
  box-shadow:0 10px 30px rgba(0,0,0,.14)!important;
}
#v80-system-page[data-v84-system="1"] .v80-card-title{
  padding-bottom:12px!important;
  margin-bottom:9px!important;
}
#v80-system-page[data-v84-system="1"] .v80-card-title>i{
  width:36px!important;
  height:36px!important;
  border-radius:11px!important;
}
#v80-system-page[data-v84-system="1"] .v80-setting-row{
  grid-template-columns:minmax(0,1fr) auto!important;
  gap:14px!important;
  margin-top:8px!important;
  padding:12px 13px!important;
  border:1px solid rgba(255,255,255,.07)!important;
  border-radius:13px!important;
  background:rgba(7,11,16,.38)!important;
}
#v80-system-page[data-v84-system="1"] .v80-setting-row:last-child{
  border-bottom:1px solid rgba(255,255,255,.07)!important;
}
#v80-system-page[data-v84-system="1"] .v80-setting-row>span{
  padding-inline-end:58px!important;
}
#v80-system-page[data-v84-system="1"] .v80-setting-row::after{
  content:"متوقف";
  position:absolute;
  inset-inline-end:68px;
  top:50%;
  transform:translateY(-50%);
  padding:3px 7px;
  border-radius:999px;
  background:rgba(148,163,184,.10);
  color:#8994a3;
  font-size:8px;
  font-weight:900;
  pointer-events:none;
}
#v80-system-page[data-v84-system="1"] .v80-setting-row[data-v84-state="on"]::after{
  content:"مفعّل";
  background:rgba(34,197,94,.10);
  color:#66da91;
}
#v80-system-page[data-v84-system="1"] .v80-wa-card{
  padding-bottom:14px!important;
}
#v80-system-page[data-v84-system="1"] .v80-token-grid{
  margin-top:11px!important;
}
#v80-system-page[data-v84-system="1"] .v80-wa-state{
  margin:9px 0!important;
}
#v80-system-page[data-v84-system="1"] .v80-system-footer{
  margin-top:2px!important;
  padding:11px 12px!important;
  border-radius:15px!important;
}

@media (max-width:700px){
  #v51-vehicle-type.v84-inline-vehicle-type{
    flex-direction:column!important;
    align-items:stretch!important;
    gap:10px!important;
    padding:12px!important;
  }
  #v51-vehicle-type.v84-inline-vehicle-type .v51-segment{
    width:100%!important;
  }
  #v51-vehicle-type.v84-inline-vehicle-type .v51-segment button{
    flex:1 1 0!important;
    min-width:0!important;
  }

  #v80-system-page[data-v84-system="1"].v83-system-embedded .v80-system-shell{
    padding:10px 0 calc(22px + env(safe-area-inset-bottom))!important;
  }
  #v80-system-page[data-v84-system="1"] .v80-system-head{
    padding:8px 2px 14px!important;
  }
  #v80-system-page[data-v84-system="1"] .v80-system-head h1{font-size:21px!important}
  #v80-system-page[data-v84-system="1"] .v80-system-grid{gap:10px!important;padding:10px 0!important}
  #v80-system-page[data-v84-system="1"] .v80-system-card{padding:13px!important;border-radius:16px!important}
  #v80-system-page[data-v84-system="1"] .v80-setting-row{padding:11px!important}
  #v80-system-page[data-v84-system="1"] .v80-setting-row>span{padding-inline-end:0!important}
  #v80-system-page[data-v84-system="1"] .v80-setting-row::after{display:none!important}
}
