/* ============================================
   Location Picker — Cascading Region/Province/Comune
   ============================================ */

/* Display field */
.location-picker-display {
  min-height: 52px;
  user-select: none;
  transition: border-color 0.3s;
  position: relative;
  padding-right: 40px !important;
}
.location-picker-display::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #999;
  pointer-events: none;
}
.location-picker-display:hover,
.location-picker-display:focus {
  border-color: #c9a84c;
  outline: none;
}
.location-picker-display:hover::after,
.location-picker-display:focus::after {
  border-top-color: #c9a84c;
}

/* ── DESKTOP / TABLET PANEL ── */
.lp-panel {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 100;
  background: #fff;
  border: 1px solid #e8e6e1;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-height: 440px;
  display: flex;
  flex-direction: column;
  width: min(700px, 90vw);
}
.lp-panel.lp-open {
  opacity: 1;
  transform: translateY(4px);
}
.lp-panel.lp-closing {
  opacity: 0;
  transform: translateY(-8px);
}

/* Header */
.lp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #e8e6e1;
  flex-shrink: 0;
}
.lp-header-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px;
  font-weight: 600;
  color: #1a1a2e;
}
.lp-clear-btn {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #999;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.2s;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
}
.lp-clear-btn:hover {
  color: #c9a84c;
}

/* Columns */
.lp-columns {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.lp-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #e8e6e1;
  min-width: 0;
}
.lp-col:last-child {
  border-right: none;
}
.lp-col-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #c9a84c;
  font-weight: 700;
  padding: 10px 14px 6px;
  font-family: 'Montserrat', sans-serif;
  flex-shrink: 0;
}
.lp-col-list {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.lp-col-list::-webkit-scrollbar {
  width: 4px;
}
.lp-col-list::-webkit-scrollbar-thumb {
  background: #d0cec9;
  border-radius: 2px;
}

/* Items */
.lp-item {
  padding: 10px 14px;
  font-size: 14px;
  color: #1a1a2e;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  font-family: 'Montserrat', sans-serif;
  border-bottom: 1px solid rgba(232, 230, 225, 0.5);
}
.lp-item:hover {
  background: rgba(201, 168, 76, 0.08);
}
.lp-item.lp-active {
  background: #c9a84c;
  color: #1a1a2e;
  font-weight: 600;
}

/* Empty state */
.lp-empty {
  padding: 20px 14px;
  text-align: center;
  color: #999;
  font-size: 13px;
  font-style: italic;
  font-family: 'Montserrat', sans-serif;
}

/* Search */
.lp-search-wrap {
  padding: 8px 10px;
  flex-shrink: 0;
}
.lp-search {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #e8e6e1;
  font-size: 13px;
  font-family: 'Montserrat', sans-serif;
  outline: none;
  transition: border-color 0.2s;
}
.lp-search:focus {
  border-color: #c9a84c;
}
.lp-comuni-container {
  max-height: 280px;
  overflow-y: auto;
}

/* Tablet: 2 columns */
.lp-panel-tablet .lp-columns {
  flex-wrap: nowrap;
}
.lp-panel-tablet .lp-col-municipality {
  flex: 1.3;
}

/* ── MOBILE BOTTOM SHEET ── */
.lp-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(26, 26, 46, 0.6);
  opacity: 0;
  transition: opacity 0.3s;
}
.lp-overlay.lp-visible {
  opacity: 1;
}

.lp-mobile-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #fff;
  border-radius: 16px 16px 0 0;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}
.lp-mobile-panel.lp-open {
  transform: translateY(0);
}
.lp-mobile-panel.lp-closing {
  transform: translateY(100%);
}

/* Mobile header */
.lp-mobile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e8e6e1;
  flex-shrink: 0;
}
.lp-mobile-header::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 4px;
  background: #d0cec9;
  border-radius: 2px;
}
.lp-mobile-header-left {
  min-width: 80px;
}
.lp-mobile-header-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 600;
  color: #1a1a2e;
  text-align: center;
}
.lp-mobile-header-right {
  min-width: 80px;
  text-align: right;
}
.lp-back-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  color: #c9a84c;
  font-weight: 600;
  font-family: 'Montserrat', sans-serif;
  padding: 4px 0;
}
.lp-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #999;
  padding: 4px;
  transition: color 0.2s;
}
.lp-close-btn:hover {
  color: #1a1a2e;
}

/* Breadcrumb */
.lp-breadcrumb {
  padding: 8px 20px;
  font-size: 12px;
  color: #c9a84c;
  font-weight: 600;
  font-family: 'Montserrat', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(201, 168, 76, 0.05);
  flex-shrink: 0;
}

/* Mobile search */
.lp-mobile-search {
  padding: 12px 20px 4px;
  flex-shrink: 0;
}
.lp-mobile-search .lp-search {
  padding: 12px 16px;
  font-size: 15px;
  border-radius: 0;
}

/* Mobile list */
.lp-mobile-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.lp-mobile-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  font-size: 15px;
  color: #1a1a2e;
  cursor: pointer;
  border-bottom: 1px solid rgba(232, 230, 225, 0.5);
  min-height: 48px;
  font-family: 'Montserrat', sans-serif;
  transition: background 0.15s;
  -webkit-tap-highlight-color: rgba(201, 168, 76, 0.1);
}
.lp-mobile-item:active {
  background: rgba(201, 168, 76, 0.1);
}

/* Mobile clear */
.lp-mobile-clear {
  padding: 12px 20px;
  border-top: 1px solid #e8e6e1;
  flex-shrink: 0;
  text-align: center;
}
.lp-mobile-clear .lp-clear-btn {
  padding: 10px 24px;
}
