/* =========================================
 * 1. TRIGGER BUTTON AREA
 * ========================================= */

.locsh-for-woocom-location-selector-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 15px;
  padding: 15px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background-color: #f9fafb;
  /* Light Gray Background */
}

#locsh-for-woocom-open-modal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border: none;
  border-radius: 6px;
  background-color: #111827;
  /* Dark / Almost Black */
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

#locsh-for-woocom-open-modal:hover {
  transform: translateY(-1px);
  background-color: #374151;
}

#locsh-for-woocom-selected-display {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #059669;
  /* Emerald Green */
  font-size: 14px;
  font-weight: 600;
}

/* =========================================
 * 2. MODAL OVERLAY (FIXED Z-INDEX & CENTERING)
 * ========================================= */

#locsh-for-woocom-modal {
  display: none;
  position: fixed;
  /* MAX Z-INDEX TO FORCE IT OVER NAV MENUS */
  z-index: 2147483647 !important;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5); /* Dim background */
  backdrop-filter: blur(2px);

  /* PERFECT CENTER ALIGNMENT */
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

/* Hardening: Reset Box Sizing */
#locsh-for-woocom-modal * {
  box-sizing: border-box;
}

/* =========================================
 * 3. MODAL CARD (NO CUT OFF)
 * ========================================= */

.locsh-for-woocom-modal-content {
  background-color: #fff;
  width: 100%;
  max-width: 500px;
  max-height: 80vh; /* Prevents it from hitting top/bottom of screen */
  border-radius: 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  position: relative;
  /* ENSURE VISIBILITY */
  opacity: 1;
  transform: translateZ(0);
  color: #374151;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  animation: locshForWoocomSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes locshForWoocomSlideUp {
  from {
    transform: translateY(20px) scale(0.98);
    opacity: 0;
  }

  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* =========================================
 * 4. MODAL HEADER
 * ========================================= */

.locsh-for-woocom-modal-header {
  flex-shrink: 0;
  /* Prevents header from shrinking */
  padding: 16px 20px;
  border-bottom: 1px solid #f3f4f6;
  background-color: #fff;
}

.locsh-for-woocom-modal-header h3 {
  margin: 0;
  padding: 0;
  color: #111827;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: normal;
  text-transform: none;
}

/* =========================================
 * 5. MODAL BODY (GRID ALIGNMENT)
 * ========================================= */

.locsh-for-woocom-modal-body {
  overflow-y: auto;
  padding: 0;
  background-color: #fff;
  -webkit-overflow-scrolling: touch;
}

/* Custom Scrollbar */
.locsh-for-woocom-modal-body::-webkit-scrollbar {
  width: 6px;
}

.locsh-for-woocom-modal-body::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background-color: #e5e7eb;
}

/* List Item Styling */
.locsh-for-woocom-radio-label {
  /* GRID: [RADIO] [TEXT-LEFT] [PRICE-RIGHT] */
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #f3f4f6;
  cursor: pointer;
  margin: 0 !important;
  width: 100%;
  box-sizing: border-box;
  text-align: left; /* FORCE LEFT ALIGNMENT */
  transition: background-color 0.15s ease;
}

.locsh-for-woocom-radio-label:last-child {
  border-bottom: none;
}

.locsh-for-woocom-radio-label:hover {
  background-color: #f9fafb;
}

/* The Radio Circle */
.locsh-for-woocom-radio-label input[type="radio"] {
  margin: 0;
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #111827;
}

.locsh-for-woocom-label-text {
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  line-height: 1.4;
  text-align: left; /* ENSURE TEXT IS LEFT ALIGNED */
}

/* Price Badge */
.locsh-for-woocom-price-badge {
  background-color: #f3f4f6;
  color: #111827;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

/* =========================================
 * 6. MODAL FOOTER (STICKY BOTTOM)
 * ========================================= */

.locsh-for-woocom-modal-footer {
  display: flex;
  justify-content: flex-end;
  flex-shrink: 0;
  /* Prevents footer from shrinking */
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid #f3f4f6;
  background-color: #fff;
}

#locsh-for-woocom-close-modal {
  padding: 8px 16px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background-color: #fff;
  color: #374151;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

#locsh-for-woocom-close-modal:hover {
  border-color: #9ca3af;
  background-color: #f9fafb;
}

#locsh-for-woocom-confirm-selection {
  padding: 8px 20px;
  border: none;
  border-radius: 6px;
  background-color: #111827;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

#locsh-for-woocom-confirm-selection:hover {
  transform: translateY(-1px);
  background-color: #000;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
