/*
 * ZIP Lead Time Checker — front-end styles.
 * Pill-style unified search bar matching the reference design.
 */

.zltc-wrap {
  --zltc-primary: #1aa3e0;
  --zltc-primary-dark: #1389bf;
  --zltc-border: #c8e3f1;
  --zltc-text: #1a2b3c;
  --zltc-muted: #5b6573;
  --zltc-success: #146c43;
  --zltc-warn: #b5651d;
  --zltc-error: #b42318;
  --zltc-bg-tint: linear-gradient(135deg, #f4fbff 0%, #e7f4fc 100%);

  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  color: var(--zltc-text);
  max-width: 1100px;
  width: 800px;
  margin: 0 auto;
  padding: 24px 16px;
  /* background: var(--zltc-bg-tint); */
  border-radius: 12px;
}

/* Heading area */
.zltc-title {
  font-size: 1.55rem;
  margin: 0 0 6px;
  line-height: 1.25;
  color: var(--zltc-text);
}
.zltc-subtitle {
  margin: 0 0 22px;
  color: var(--zltc-muted);
  font-size: 1rem;
}

/* The pill search bar */
.zltc-form {
  display: block;
}

.zltc-searchbar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1.5px solid var(--zltc-border);
  border-radius: 999px;
  padding: 6px 6px 6px 22px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
  flex-wrap: wrap;
}
.zltc-searchbar:focus-within {
  border-color: var(--zltc-primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--zltc-primary) 15%, transparent);
}

/* Leading pin icon */
.zltc-searchbar__leading-icon {
  display: inline-flex;
  align-items: center;
  color: var(--zltc-primary);
  flex-shrink: 0;
}
.zltc-icon {
  width: 22px;
  height: 22px;
  display: block;
}

/* The input — borderless, fills available space */
.zltc-searchbar__input {
  flex: 1 1 220px;
  min-width: 0;
  border: none !important;
  outline: none;
  background: transparent;
  font-size: 1.05rem;
  color: var(--zltc-text);
  padding: 12px 6px;
  font-family: inherit;
}
.zltc-searchbar__input::placeholder {
  color: #94a3b8;
  opacity: 1;
}

/* "Use Current Location" — text-like button with icon */
.zltc-searchbar__geo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: var(--zltc-primary);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 999px;
  transition:
    background 0.15s,
    color 0.15s;
  white-space: nowrap;
}
.zltc-searchbar__geo:hover {
  background: rgba(26, 163, 224, 0.08);
}
.zltc-searchbar__geo .zltc-icon {
  width: 20px;
  height: 20px;
}

/* Solid primary submit button — fully rounded pill */
.zltc-searchbar__submit {
  background: var(--zltc-primary);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 13px 28px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition:
    background 0.15s,
    transform 0.05s;
}
.zltc-searchbar__submit:hover {
  background: var(--zltc-primary-dark);
}
.zltc-searchbar__submit:active {
  transform: translateY(1px);
}
.zltc-searchbar__submit:disabled {
  opacity: 0.65;
  cursor: progress;
}

/* Status message */
.zltc-message {
  margin: 14px 4px 0;
  min-height: 1.2em;
  font-size: 0.95rem;
  color: var(--zltc-error);
}
.zltc-message.is-info {
  color: var(--zltc-muted);
}
.zltc-message.is-warn {
  color: var(--zltc-warn);
}

/* Screen-reader-only helper (matches WP convention) */
.zltc-wrap .screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Results area */
.zltc-results {
  margin-top: 26px;
}

.zltc-summary {
  background: #ffffff;
  border: 1px solid var(--zltc-border);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 18px;
  font-size: 1rem;
  line-height: 1.6;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}
.zltc-summary strong {
  color: var(--zltc-text);
}
.zltc-summary .pill {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-left: 6px;
  vertical-align: middle;
}
.zltc-summary .pill.yes {
  background: #e6f4ec;
  color: var(--zltc-success);
}
.zltc-summary .pill.no {
  background: #fdecec;
  color: var(--zltc-error);
}

/* Freight-shipping fallback footnote (shown when ZIP isn't in our database). */
.zltc-summary .zltc-footnote {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--zltc-border);
  font-size: 0.85rem;
  color: var(--zltc-muted);
  font-style: italic;
  line-height: 1.55;
}

/* "Please Call" treatment in the per-product table delivery column. */
.zltc-table .please-call {
  color: var(--zltc-primary);
  font-weight: 600;
}

.zltc-table-wrap {
  background: #ffffff;
  border: 1px solid var(--zltc-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}
.zltc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
}
.zltc-table th,
.zltc-table td {
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid #eef3f7;
}
.zltc-table tbody tr:last-child td {
  border-bottom: none;
}
.zltc-table thead th {
  background: #f5fafd;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--zltc-muted);
}
.zltc-table .product-name {
  font-weight: 600;
}
.zltc-table .cutoff-note {
  display: block;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--zltc-muted);
  margin-top: 3px;
}
.zltc-table .lead-pretty {
  display: block;
  font-size: 0.82rem;
  color: var(--zltc-muted);
  margin-top: 3px;
}
.zltc-table .na {
  color: var(--zltc-muted);
  font-style: italic;
}

/* Mobile: search bar collapses to stacked layout */
@media (max-width: 720px) {
  .zltc-searchbar {
    border-radius: 18px;
    padding: 10px;
    gap: 6px;
  }
  .zltc-searchbar__leading-icon {
    padding-left: 10px;
  }
  .zltc-searchbar__input {
    flex: 1 1 100%;
    padding: 10px 6px;
  }
  .zltc-searchbar__geo,
  .zltc-searchbar__submit {
    flex: 1 1 auto;
    justify-content: center;
  }
  .zltc-searchbar__submit {
    padding: 13px 20px;
  }
}

@media (max-width: 480px) {
  .zltc-title {
    font-size: 1.3rem;
  }
  .zltc-subtitle {
    font-size: 0.95rem;
  }
  .zltc-searchbar__geo,
  .zltc-searchbar__submit {
    flex: 1 1 100%;
  }
  .zltc-table th,
  .zltc-table td {
    padding: 12px 14px;
  }
}

/* ================================================================
 * Location Finder styles ([zltc_location_finder] shortcode)
 * ================================================================ */

.zltc-locator-wrap .zltc-message {
  margin-top: 14px;
  margin-left: 4px;
}

.zltc-locator-card {
  background: #ffffff;
  border: 1px solid var(--zltc-border);
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  overflow: hidden;
  margin-top: 26px;
}

.zltc-locator-header {
  padding: 22px 26px 18px;
  border-bottom: 1px solid var(--zltc-border);
  background: linear-gradient(180deg, #f7fbfe 0%, #ffffff 100%);
}
.zltc-locator-name {
  margin: 0 0 4px;
  font-size: 1.4rem;
  color: var(--zltc-text);
  line-height: 1.25;
}
.zltc-locator-zip {
  color: var(--zltc-muted);
  font-size: 0.95rem;
}
.zltc-locator-zip strong {
  color: var(--zltc-primary);
}

.zltc-locator-notice {
  background: #fff8e6;
  border-bottom: 1px solid #f4e2a8;
  padding: 12px 26px;
  color: #6b4f00;
  font-size: 0.92rem;
}

.zltc-locator-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
}

.zltc-locator-details {
  padding: 22px 26px;
  display: grid;
  gap: 16px;
  align-content: start;
}

.zltc-locator-info {
  display: block;
}
.zltc-locator-info-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--zltc-muted);
  margin-bottom: 4px;
}
.zltc-locator-info-value {
  color: var(--zltc-text);
  font-size: 0.98rem;
  line-height: 1.5;
}
.zltc-locator-info-value a {
  color: var(--zltc-primary);
  text-decoration: none;
}
.zltc-locator-info-value a:hover {
  text-decoration: underline;
}

.zltc-locator-map {
  background: #e7f0f5;
  min-height: 320px;
  position: relative;
  border-left: 1px solid var(--zltc-border);
}
.zltc-locator-map iframe {
  border: 0;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 320px;
}

.zltc-locator-actions {
  display: flex;
  gap: 12px;
  padding: 18px 26px 22px;
  border-top: 1px solid var(--zltc-border);
  background: #fafcfd;
  flex-wrap: wrap;
}

.zltc-btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  border-radius: 999px;
  font-size: 0.98rem;
  font-weight: 600;
  text-decoration: none !important;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s,
    transform 0.05s;
  white-space: nowrap;
  cursor: pointer;
  border: 1.5px solid var(--zltc-primary);
}
.zltc-btn-action:active {
  transform: translateY(1px);
}

.zltc-btn-action-primary {
  background: var(--zltc-primary);
  color: #ffffff !important;
}
.zltc-btn-action-primary:hover {
  background: var(--zltc-primary-dark);
  border-color: var(--zltc-primary-dark);
}

.zltc-btn-action-secondary {
  background: transparent;
  color: var(--zltc-primary) !important;
}
.zltc-btn-action-secondary:hover {
  background: rgba(26, 163, 224, 0.08);
}

/* Locator responsive: stack at narrow widths */
@media (max-width: 991px) {
  .zltc-wrap {
    width: auto;
  }
  .zltc-searchbar {
    justify-content: center;
  }
  .zltc-searchbar__input {
    text-align: center;
  }
}
@media (max-width: 780px) {
  .zltc-locator-body {
    grid-template-columns: 1fr;
  }
  .zltc-locator-map {
    border-left: none;
    border-top: 1px solid var(--zltc-border);
    min-height: 260px;
  }
  .zltc-locator-map iframe {
    min-height: 260px;
  }
  .zltc-locator-header {
    padding: 18px 20px 14px;
  }
  .zltc-locator-details {
    padding: 18px 20px;
  }
  .zltc-locator-actions {
    padding: 14px 20px 18px;
  }
}

@media (max-width: 480px) {
  .zltc-locator-name {
    font-size: 1.2rem;
  }
  .zltc-btn-action {
    flex: 1 1 100%;
  }
}
