/* Emergency hero section */
.ac-em-hero{
  position: relative;
  min-height: 220px;
  display: grid;
  align-items: center;
  overflow: hidden;
  background: radial-gradient(1200px 400px at 20% 20%, rgba(220,53,69,.35), transparent),
              linear-gradient(120deg, #111827, #0b1220);
}

/* Hero overlay */
.ac-em-hero__overlay{
  position:absolute;
  inset:0;
  background: linear-gradient(120deg, rgba(0,0,0,.55), rgba(0,0,0,.20));
}

/* Hero content */
.ac-em-hero__inner{
  position: relative;
  z-index: 1;
  padding: 48px 16px;
  color: #fff;
}

/* Emergency badge */
.ac-em-badge{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(220,53,69,.15);
  border: 1px solid rgba(220,53,69,.35);
  font-weight: 700;
  letter-spacing: .2px;
  margin-bottom: 14px;
}

/* Hero title */
.ac-em-title{
  font-weight: 800;
  margin: 0 0 6px;
}

/* Hero subtitle */
.ac-em-sub{
  margin: 0;
  opacity: .9;
}

/* Main card */
.ac-card{
  border: 1px solid rgba(15, 23, 42, .10);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(2, 6, 23, .08);
}

/* Form inputs */
.ac-em-form .form-control,
.ac-em-form .form-select{
  border-radius: 12px;
}

/* Map box */
.ac-em-map{
  height: 380px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, .10);
}

/* Small text */
.ac-em-small{
  font-size: 12px;
  font-weight: 600;
}

/* Payment grid */
.ac-pay-grid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 576px){
  .ac-pay-grid{ grid-template-columns: 1fr 1fr; }
}

/* Payment card */
.ac-pay{
  position: relative;
  display: grid;
  gap: 4px;
  padding: 14px 14px 14px 46px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, .12);
  cursor: pointer;
  transition: transform .08s ease, border-color .15s ease, box-shadow .15s ease;
  background: #fff;
}

/* Payment card hover */
.ac-pay:hover{
  transform: translateY(-1px);
  border-color: rgba(220,53,69,.35);
  box-shadow: 0 10px 22px rgba(2,6,23,.08);
}

/* Payment radio button */
.ac-pay input{
  position:absolute;
  left: 14px;
  top: 18px;
  width: 18px;
  height: 18px;
  accent-color: #dc3545;
}

/* Payment title */
.ac-pay__title{
  font-weight: 800;
}

/* Payment description */
.ac-pay__desc{
  font-size: 13px;
  color: rgba(15, 23, 42, .65);
}

/* Submit button */
.ac-em-cta .btn{
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 14px 30px rgba(220,53,69,.25);
}

/* Upload preview grid */
#uploadPreview{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:10px;
}

/* Upload preview item */
.preview-item{
  border:1px solid #ddd;
  border-radius:12px;
  overflow:hidden;
}

/* Upload preview image and video */
.preview-item img,
.preview-item video{
  width:100%;
  height:150px;
  object-fit:cover;
}

/* Map card */
.ac-em-mapCard{
  position: relative;
}

/* Mobile map height */
@media (max-width: 576px){
  .ac-em-map{ height: 320px; }
}

/* Sticky side card */


@media (max-width: 992px){
  .ac-em-side{
    position: static;
    top: auto;
  }
}

/* Upload preview grid responsive */
@media (max-width: 768px){
  #uploadPreview{ grid-template-columns:repeat(3,1fr); }
}

@media (max-width: 480px){
  #uploadPreview{ grid-template-columns:repeat(2,1fr); }
}

/* Sticky submit area on mobile */
@media (max-width: 992px){
  .ac-em-cta{
    position: sticky;
    bottom: 10px;
    z-index: 5;
  }

  .ac-em-cta .ac-em-btn{
    box-shadow: 0 18px 40px rgba(220,53,69,.30);
  }
}


/* Improved emergency form cards */
.ac-em-sectionCard{
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,1), rgba(248,250,252,.98));
}

/* Vehicle card top accent */
.ac-em-vehicleCard{
  border-top: 4px solid #dc3545;
}

/* Contact card top accent */
.ac-em-contactCard{
  border-top: 4px solid #f47920;
}

/* Section header */
.ac-em-sectionHead{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding-bottom:18px;
  margin-bottom:18px;
  border-bottom:1px solid rgba(15,23,42,.08);
}

/* Small step label */
.ac-em-sectionKicker{
  display:inline-flex;
  align-items:center;
  padding:5px 10px;
  border-radius:999px;
  background:rgba(220,53,69,.10);
  color:#dc3545;
  font-size:12px;
  font-weight:800;
  margin-bottom:8px;
}

/* Section title */
.ac-em-sectionTitle{
  margin:0;
  font-size:22px;
  font-weight:900;
  color:#111827;
}

/* Section subtitle */
.ac-em-sectionText{
  margin:6px 0 0;
  color:#64748b;
  font-size:14px;
  line-height:1.5;
}

/* Section icon */
.ac-em-sectionIcon{
  width:48px;
  height:48px;
  flex:0 0 48px;
  display:grid;
  place-items:center;
  border-radius:16px;
  background:#fff;
  box-shadow:0 10px 24px rgba(2,6,23,.08);
  font-size:22px;
}

/* Better inputs */
.ac-em-input{
  min-height:48px;
  border:1px solid rgba(15,23,42,.14);
  background:#fff;
  transition:border-color .15s ease, box-shadow .15s ease, transform .08s ease;
}

/* Textarea height */
textarea.ac-em-input{
  min-height:112px;
  resize:vertical;
}

/* Input focus */
.ac-em-input:focus{
  border-color:rgba(220,53,69,.55);
  box-shadow:0 0 0 .22rem rgba(220,53,69,.12);
}

/* Label polish */
.ac-em-sectionCard .form-label{
  color:#1f2937;
  font-size:14px;
  margin-bottom:7px;
}

/* Helper text */
.ac-em-sectionCard .form-text{
  color:#64748b;
  font-size:12px;
}

/* Emergency warning note */
.ac-em-warningNote{
  padding:12px 14px;
  border-radius:14px;
  background:rgba(220,53,69,.08);
  border:1px solid rgba(220,53,69,.18);
  color:#7f1d1d;
  font-size:13px;
  line-height:1.5;
}

/* Upload box */
.ac-em-uploadBox{
  position:relative;
  padding:14px;
  border-radius:16px;
  background:#f8fafc;
  border:1px dashed rgba(15,23,42,.20);
}

/* File input */
.ac-em-file{
  border-radius:12px;
  background:#fff;
}

/* Upload hint */
.ac-em-uploadHint{
  display:flex;
  gap:12px;
  align-items:flex-start;
  margin-top:12px;
  color:#334155;
}

.ac-em-uploadHint span{
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border-radius:12px;
  background:#fff;
  box-shadow:0 8px 18px rgba(2,6,23,.06);
}

.ac-em-uploadHint strong{
  display:block;
  font-size:14px;
  color:#111827;
}

.ac-em-uploadHint small{
  display:block;
  margin-top:2px;
  color:#64748b;
  font-size:12px;
}

/* Contact info box */
.ac-em-contactInfo{
  display:flex;
  gap:12px;
  margin-top:20px;
  padding:14px;
  border-radius:16px;
  background:linear-gradient(135deg, rgba(244,121,32,.10), rgba(220,53,69,.08));
  border:1px solid rgba(244,121,32,.18);
}

/* Contact info icon */
.ac-em-contactInfoIcon{
  width:36px;
  height:36px;
  flex:0 0 36px;
  display:grid;
  place-items:center;
  border-radius:12px;
  background:#fff;
  box-shadow:0 8px 18px rgba(2,6,23,.07);
}

/* Contact info text */
.ac-em-contactInfo strong{
  display:block;
  color:#111827;
  font-size:14px;
  margin-bottom:3px;
}

.ac-em-contactInfo span{
  display:block;
  color:#64748b;
  font-size:13px;
  line-height:1.45;
}

/* Better emergency button */
.ac-em-btn{
  border:0;
  background:linear-gradient(135deg, #dc3545, #f47920);
  transition:transform .1s ease, box-shadow .15s ease;
}

.ac-em-btn:hover{
  transform:translateY(-1px);
  box-shadow:0 18px 38px rgba(220,53,69,.30);
}

/* Preview improvements */
.preview-item{
  background:#fff;
  box-shadow:0 8px 18px rgba(2,6,23,.07);
}

/* Mobile adjustments */
@media (max-width: 576px){
  .ac-em-sectionHead{
    gap:12px;
  }

  .ac-em-sectionTitle{
    font-size:20px;
  }

  .ac-em-sectionIcon{
    width:42px;
    height:42px;
    flex-basis:42px;
    font-size:20px;
  }
}

/* Success dialog overlay */
.ac-em-successOverlay{
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(11, 18, 32, .72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* Success dialog box */
.ac-em-successBox{
  width: min(480px, 100%);
  background: #fff;
  border-radius: 24px;
  padding: 34px 28px;
  text-align: center;
  box-shadow: 0 24px 70px rgba(0,0,0,.25);
  animation: acSuccessPop .25s ease-out;
}

/* Success icon */
.ac-em-successIcon{
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: #dcfce7;
  color: #16a34a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  font-weight: 900;
}

/* Success title */
.ac-em-successBox h3{
  margin: 0 0 10px;
  font-weight: 900;
  color: #0f172a;
}

/* Success text */
.ac-em-successBox p{
  margin: 0;
  color: #64748b;
  line-height: 1.6;
}

/* Request number box */
.ac-em-requestNo{
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-weight: 700;
}

/* Dialog animation */
@keyframes acSuccessPop{
  from{
    transform: scale(.92);
    opacity: 0;
  }
  to{
    transform: scale(1);
    opacity: 1;
  }
}