/* COC Delivery Zones — Frontend CSS */

/* ── Modal overlay ── */
.coc-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.coc-modal.coc-open {
  opacity: 1;
  pointer-events: auto;
}
.coc-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(3px);
}

/* ── Modal box ── */
.coc-modal-box {
  position: relative;
  background: #fff;
  border-radius: 16px;
  width: min(480px, 92vw);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  transform: translateY(12px);
  transition: transform 0.25s ease;
}
.coc-modal.coc-open .coc-modal-box {
  transform: translateY(0);
}

/* ── Modal close ── */
.coc-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  background: #f4f4f4;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  transition: background 0.2s;
  z-index: 2;
}
.coc-modal-close:hover { background: #e8e8e8; }

/* ── Modal header ── */
.coc-modal-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 22px 16px;
  border-bottom: 1px solid #f0f0f0;
}
.coc-modal-pin-icon {
  color: #EF7170;
  flex-shrink: 0;
}
.coc-modal-header h2 {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 3px;
  color: #1a1208;
}
.coc-modal-header p {
  font-size: 13px;
  color: #777;
  margin: 0;
}

/* ── Search ── */
.coc-modal-search-wrap {
  position: relative;
  padding: 14px 18px;
  border-bottom: 1px solid #f0f0f0;
}
.coc-modal-search-wrap svg {
  position: absolute;
  top: 50%;
  right: 32px;
  transform: translateY(-50%);
  color: #aaa;
  pointer-events: none;
}
#coc-city-search {
  width: 100%;
  height: 42px;
  border: 1.5px solid #E5E5E5;
  border-radius: 8px;
  padding: 0 40px 0 14px;
  font-size: 14px;
  outline: none;
  background: #F7F7F7;
  color: #1a1208;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
#coc-city-search:focus { border-color: #EF7170; background: #fff; }

/* ── City list ── */
.coc-city-list {
  overflow-y: auto;
  flex: 1;
  padding: 8px 0;
}
.coc-state-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #aaa;
  padding: 10px 18px 4px;
}
.coc-city-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 10px 18px;
  font-size: 14px;
  color: #2a1f10;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.coc-city-btn svg { color: #bbb; flex-shrink: 0; transition: color 0.15s; }
.coc-city-btn:hover { background: #faf0e4; color: #EF7170; }
.coc-city-btn:hover svg { color: #EF7170; }
.coc-city-btn.selected { background: #fdf5e8; color: #EF7170; font-weight: 500; }
.coc-city-btn.selected svg { color: #EF7170; }

.coc-no-results {
  padding: 32px 24px;
  color: #999;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.coc-no-results svg { color: #C7C7C7; }
.coc-no-results strong {
  font-size: 14px;
  font-weight: 600;
  color: #2B2B2B;
}
.coc-no-results span {
  font-size: 12.5px;
  color: #767676;
  max-width: 280px;
  line-height: 1.5;
}

/* ── Modal footer ── */
.coc-modal-footer {
  padding: 12px 18px;
  border-top: 1px solid #f0f0f0;
  text-align: center;
}
.coc-modal-skip {
  background: none;
  border: none;
  color: #aaa;
  font-size: 12.5px;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.2s;
}
.coc-modal-skip:hover { color: #666; }

/* ── City bar (legacy header indicator hook, kept for compatibility) ── */
.coc-city-bar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #2B2B2B;
  cursor: pointer;
  padding: 4px 10px;
  border: 1px solid #E5E5E5;
  border-radius: 20px;
  background: #F7F7F7;
  transition: border-color 0.2s, background 0.2s;
}
.coc-city-bar:hover { border-color: #EF7170; background: #fff; }
.coc-city-bar svg { color: #EF7170; }
.coc-city-bar .coc-bar-city { font-weight: 500; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coc-city-bar .coc-bar-change { font-size: 11px; color: #EF7170; }

/* ── Location bar — [coc_location_bar] shortcode, Blinkit-style header pill ── */
.coc-loc-bar {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'Poppins', sans-serif;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px 4px;
  color: #010101;
  max-width: 220px;
  transition: opacity 0.2s;
}
.coc-loc-bar:hover { opacity: 0.75; }
.coc-loc-bar > svg:first-child { color: #EF7170; flex-shrink: 0; }
.coc-loc-bar-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
  overflow: hidden;
  text-align: left;
}
.coc-loc-bar-city {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}
.coc-loc-bar-pin {
  font-size: 11px;
  color: #767676;
  white-space: nowrap;
}
.coc-loc-bar-chev {
  color: #767676;
  flex-shrink: 0;
}
@media (max-width: 480px) {
  .coc-loc-bar { max-width: 140px; }
  .coc-loc-bar-city { max-width: 100px; }
}

/* ── Pincode checker ── */
.coc-pincode-checker {
  margin: 16px 0;
  padding: 14px 16px;
  background: #F7F7F7;
  border: 1px solid #E5E5E5;
  border-radius: 10px;
}
.coc-pincode-inner {
  display: flex;
  align-items: center;
  gap: 10px;
}
.coc-pin-icon { color: #EF7170; flex-shrink: 0; }
.coc-pincode-fields {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}
.coc-pincode-input {
  flex: 1;
  height: 40px;
  border: 1.5px solid #E5E5E5;
  border-radius: 6px;
  padding: 0 12px;
  font-size: 14px;
  outline: none;
  background: #fff;
  color: #1a1208;
  transition: border-color 0.2s;
  min-width: 0;
}
.coc-pincode-input:focus { border-color: #EF7170; }
.coc-pincode-btn {
  height: 40px;
  padding: 0 18px;
  background: #1a1208;
  color: #f0e6cc;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s;
}
.coc-pincode-btn:hover { background: #EF7170; }
.coc-pincode-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── Pincode result ── */
.coc-pincode-result {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.5;
}
.coc-pincode-result:empty { display: none; }
.coc-result-available {
  color: #2e7d32;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.coc-result-unavailable {
  color: #c62828;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.coc-result-available svg { color: #2e7d32; flex-shrink: 0; margin-top: 1px; }
.coc-result-unavailable svg { color: #c62828; flex-shrink: 0; margin-top: 1px; }

/* ── Slot list ── */
.coc-slot-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.coc-slot-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid #E5E5E5;
  background: #fff;
  color: #2B2B2B;
}
.coc-slot-tag.available { border-color: #2e7d32; background: #f1f8f1; color: #2e7d32; }
.coc-slot-tag.unavailable { border-color: #ddd; background: #f8f8f8; color: #aaa; text-decoration: line-through; }
.coc-slot-tag .coc-slot-surcharge { font-size: 11px; opacity: 0.75; }

@media (max-width: 480px) {
  .coc-pincode-fields { flex-wrap: wrap; }
  .coc-pincode-input { min-width: 120px; }
}
