/* Distributor Lookup page styles
   Brand colors: #ed5c2b (primary orange), #fff, #f7f7f7 (panel bg)
   Designed to sit on top of bootstrap.min.css + style.css. */

.distributor-hero {
  position: relative;
  min-height: 320px;
  background: linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)),
    url("../imgs/gallery/about-us/aboutUsTopBanner.jpg") center / cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  padding: 80px 20px;
}
.distributor-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin: 0 0 12px;
  color: #fff;
}
.distributor-hero p {
  font-size: 1.05rem;
  opacity: 0.9;
  max-width: 640px;
  margin: 0 auto;
}

.distributor-lookup {
  padding: 60px 0 80px;
  background: #fafafa;
}

.distributor-lookup .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.filter-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
  padding: 28px;
  margin-bottom: 32px;
}

.filter-card .filter-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.filter-card label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: #333;
  margin-bottom: 6px;
}

.filter-card select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  background: #fff;
  font-size: 0.95rem;
  color: #222;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%23666' d='M6 8L0 0h12z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}
.filter-card select:focus {
  outline: 2px solid #ed5c2b;
  outline-offset: 1px;
  border-color: #ed5c2b;
}
.filter-card select:disabled {
  background-color: #f3f3f3;
  color: #999;
  cursor: not-allowed;
}

.filter-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-actions .btn-primary,
.filter-actions .btn-secondary {
  border: none;
  padding: 11px 28px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.filter-actions .btn-primary {
  background: #ed5c2b;
  color: #fff;
}
.filter-actions .btn-primary:hover {
  background: #d24c1f;
  box-shadow: 0 4px 12px rgba(237, 92, 43, 0.3);
}
.filter-actions .btn-secondary {
  background: #f0f0f0;
  color: #333;
}
.filter-actions .btn-secondary:hover {
  background: #e2e2e2;
}

#distributor-status {
  margin: 0 0 16px;
  font-size: 0.95rem;
  color: #555;
  min-height: 1.4em;
}
#distributor-status.error {
  color: #c0392b;
  font-weight: 600;
}
#distributor-status.empty {
  color: #b06800;
}

.distributor-results-wrapper {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
#distributor-results {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}
#distributor-results thead th {
  background: #1a1a1a;
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: left;
  padding: 14px 16px;
  border: none;
}
#distributor-results tbody td {
  padding: 14px 16px;
  border-top: 1px solid #ececec;
  font-size: 0.92rem;
  color: #333;
  vertical-align: top;
  line-height: 1.5;
}
#distributor-results tbody tr:hover {
  background: #fff8f4;
}
#distributor-results td.col-name {
  font-weight: 600;
  color: #1a1a1a;
}
#distributor-results td.col-phone {
  white-space: pre-line;
  font-variant-numeric: tabular-nums;
  color: #ed5c2b;
}
#distributor-results td.col-pincode {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.distributor-empty {
  padding: 60px 24px;
  text-align: center;
  color: #888;
  font-size: 0.95rem;
}

.distributor-loading {
  padding: 60px 24px;
  text-align: center;
  color: #888;
}
.distributor-loading::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 28px;
  border: 3px solid #eee;
  border-top-color: #ed5c2b;
  border-radius: 50%;
  margin-right: 12px;
  vertical-align: middle;
  animation: dl-spin 0.8s linear infinite;
}
@keyframes dl-spin {
  to {
    transform: rotate(360deg);
  }
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Tablet */
@media (max-width: 900px) {
  .filter-card .filter-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Mobile */
@media (max-width: 600px) {
  .distributor-hero {
    min-height: 240px;
    padding: 60px 16px;
  }
  .distributor-lookup {
    padding: 40px 0 60px;
  }
  .filter-card {
    padding: 20px;
  }
  .filter-card .filter-grid {
    grid-template-columns: 1fr;
  }
  .filter-actions .btn-primary,
  .filter-actions .btn-secondary {
    flex: 1;
    text-align: center;
  }
}
