/* ============================================================
   DAC Service Center — CSS
   Depends on: driver.css (--dac-* variables & base classes)
   ============================================================ */

/* ============================================================
   Hero Section
   ============================================================ */
.dac-driver-section .sc-hero {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 24px;
}

.dac-driver-section .sc-hero-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--dac-light);
  color: var(--dac);
  font-size: 26px;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.dac-driver-section .sc-hero h2 {
  color: var(--dac-text) !important;
  font-size: 28px !important;
  font-weight: 800 !important;
  margin: 0 0 8px !important;
  letter-spacing: -0.4px !important;
}

.dac-driver-section .sc-hero p {
  color: var(--dac-muted) !important;
  font-size: 15px !important;
  margin: 0 0 24px !important;
  max-width: 800px;
}

/* ============================================================
   Map Card
   ============================================================ */
.sc-map-card {
  background: #fff;
  border: 1px solid var(--dac-border);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  margin-bottom: 32px;
  padding: 8px;
}

#map {
  width: 100%;
  height: 500px;
  border-radius: 16px;
  z-index: 1; /* Leaflet map z-index fix */
}

/* ============================================================
   Table Card & Search
   ============================================================ */
.sc-table-card {
  background: #fff;
  border: 1px solid var(--dac-border);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.sc-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #f0f2f7;
  flex-wrap: wrap;
  gap: 16px;
}

.sc-table-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--dac-text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sc-table-header h3 i {
  color: var(--dac);
  font-size: 22px;
}

.sc-search-wrap {
  position: relative;
  width: 320px;
  max-width: 100%;
}

.sc-search-wrap i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #99a1b3;
  font-size: 18px;
}

.sc-search-wrap input {
  width: 100%;
  height: 46px;
  padding: 0 16px 0 44px;
  border: 1px solid #eaedf4;
  border-radius: 12px;
  background: #fafbfd;
  font-size: 14px;
  color: var(--dac-text);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  outline: none;
}

.sc-search-wrap input:focus {
  border-color: var(--dac);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(36, 83, 166, 0.1);
}

.sc-search-wrap input::placeholder {
  color: #aeb5c5;
}

/* ============================================================
   Custom Table Styles
   ============================================================ */
.sc-table-responsive {
  padding: 0;
  margin: 0;
}

.sc-table {
  margin-bottom: 0 !important;
  width: 100%;
  border-collapse: collapse;
}

.sc-table thead th {
  background: #fafbfd !important;
  color: #667085 !important;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 16px 24px !important;
  border-bottom: 1px solid #eaedf4 !important;
  border-top: 0 !important;
  white-space: nowrap;
}

.sc-table tbody td {
  padding: 18px 24px !important;
  vertical-align: middle !important;
  font-size: 14px;
  color: var(--dac-text);
  border-bottom: 1px solid #f0f2f7 !important;
  border-top: 0 !important;
  transition: background 0.2s;
}

.sc-table tbody tr:last-child td {
  border-bottom: 0 !important;
}

.sc-table tbody tr:hover td {
  background: #f8fafc !important;
}

/* Highlight Animation from JS */
.sc-table tbody tr.sc-highlight td {
  background: #ebf5ff !important;
  transition: background 0.3s;
}

/* specific column styling */
.sc-table td:nth-child(1) { /* No */
  font-weight: 600;
  color: var(--dac-muted);
}
.sc-table td:nth-child(2) { /* Provinsi */
  white-space: nowrap;
}
.sc-table td:nth-child(3) { /* Kota */
  font-weight: 600;
  white-space: nowrap;
}
.sc-table td:nth-child(4) { /* Alamat */
  min-width: 280px;
  line-height: 1.5;
  color: #4a5568;
}
.sc-table td:nth-child(5) { /* Telp */
  font-weight: 600;
  white-space: nowrap;
}

/* "No results" row */
.sc-no-results td {
  text-align: center;
  padding: 40px !important;
  color: #6b7280;
  font-size: 15px;
}

/* ============================================================
   Leaflet Popup Customization
   ============================================================ */
.leaflet-popup-content-wrapper {
  border-radius: 12px !important;
  box-shadow: 0 6px 20px rgba(0,0,0,0.1) !important;
}

.leaflet-popup-content {
  margin: 16px !important;
  line-height: 1.6 !important;
  font-size: 14px !important;
  color: #333 !important;
}

.leaflet-popup-content strong {
  display: block;
  font-size: 16px;
  color: var(--dac);
  margin-bottom: 6px;
  border-bottom: 1px solid #eee;
  padding-bottom: 6px;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
  #map {
    height: 400px;
  }
  
  .sc-table-header {
    flex-direction: column;
    align-items: stretch;
  }
  
  .sc-search-wrap {
    width: 100%;
  }
  
  .sc-table thead th,
  .sc-table tbody td {
    padding: 12px 16px !important;
  }
}
