/**
 * KejaMarket Master Location Picker Styles
 * Responsive Mobile Bottom Sheet (360px-414px) + Desktop Centered Modal
 */

.loc-picker-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: locFadeIn 0.2s ease-out;
}

@media (min-width: 641px) {
  .loc-picker-backdrop {
    align-items: center;
    padding: 20px;
  }
}

.loc-picker-sheet {
  background: #ffffff;
  width: 100%;
  max-width: 640px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  animation: locSlideUp 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 641px) {
  .loc-picker-sheet {
    border-radius: 20px;
    max-height: 82vh;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    animation: locScaleUp 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  }
}

/* Header */
.loc-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px 20px;
  border-bottom: 1px solid #f1f5f9;
}

.loc-picker-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.loc-picker-pin-icon {
  font-size: 1.4rem;
  color: #00b53f;
  background: #e8f8ee;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.loc-picker-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}

.loc-picker-subtitle {
  margin: 2px 0 0 0;
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 500;
}

.loc-picker-close-btn {
  background: #f1f5f9;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.15s ease;
}

.loc-picker-close-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Search Bar */
.loc-picker-search-bar {
  position: relative;
  padding: 12px 20px;
  background: #fafafa;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
}

.loc-search-icon {
  position: absolute;
  left: 32px;
  color: #94a3b8;
  font-size: 0.95rem;
  pointer-events: none;
}

.loc-picker-search-input {
  width: 100%;
  height: 44px;
  padding: 0 40px 0 38px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #0f172a;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.loc-picker-search-input:focus {
  border-color: #00b53f;
  box-shadow: 0 0 0 3px rgba(0, 181, 63, 0.15);
}

.loc-picker-search-input::placeholder {
  color: #94a3b8;
  font-weight: 400;
  font-size: 0.85rem;
}

.loc-search-clear-btn {
  position: absolute;
  right: 32px;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.05rem;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loc-search-clear-btn:hover {
  color: #475569;
}

/* Breadcrumbs */
.loc-picker-breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 20px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.82rem;
  font-weight: 600;
  overflow-x: auto;
  white-space: nowrap;
}

.loc-bc-item {
  color: #00b53f;
  cursor: pointer;
  padding: 3px 8px;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.loc-bc-item:hover {
  background: #e8f8ee;
}

.loc-bc-separator {
  font-size: 0.65rem;
  color: #94a3b8;
}

.loc-bc-current {
  color: #0f172a;
  font-weight: 700;
  cursor: default;
}

.loc-bc-current:hover {
  background: none;
}

/* Body / List */
.loc-picker-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px 20px 16px;
  -webkit-overflow-scrolling: touch;
}

.loc-picker-section-label {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin: 6px 4px 10px 4px;
}

.loc-picker-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Cards */
.loc-item-card {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.loc-item-card:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.loc-item-card:active {
  background: #f1f5f9;
  transform: translateY(0);
}

.loc-item-card--any {
  background: #f0fdf4;
  border: 1.5px dashed #86efac;
  margin-bottom: 4px;
}

.loc-item-card--any:hover {
  background: #dcfce7;
  border-color: #00b53f;
}

.loc-card-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #f1f5f9;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  margin-right: 12px;
  flex-shrink: 0;
}

.loc-card-icon-box--green {
  background: #00b53f;
  color: #ffffff;
}

.loc-card-text {
  flex: 1;
  min-width: 0;
}

.loc-card-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.loc-card-path {
  font-size: 0.74rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.loc-card-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 10px;
  flex-shrink: 0;
}

.loc-card-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
}

.loc-card-badge--any {
  background: #00b53f;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
}

.loc-drill-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.loc-item-card:hover .loc-drill-btn {
  background: #00b53f;
  color: #ffffff;
  border-color: #00b53f;
}

.loc-leaf-check {
  color: #00b53f;
  font-size: 0.95rem;
  margin-right: 4px;
}

.loc-select-pill {
  background: #00b53f;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}

.loc-select-pill:hover {
  background: #009935;
}

.loc-highlight {
  background: #fef08a;
  color: #854d0e;
  font-weight: 800;
  padding: 0 2px;
  border-radius: 2px;
}

/* Empty State */
.loc-picker-empty {
  text-align: center;
  padding: 40px 20px;
  color: #94a3b8;
}

.loc-picker-empty i {
  font-size: 2.2rem;
  color: #cbd5e1;
  margin-bottom: 12px;
}

.loc-picker-empty p {
  font-size: 0.95rem;
  color: #475569;
  margin: 0 0 6px 0;
  font-weight: 600;
}

/* Footer */
.loc-picker-footer {
  padding: 12px 20px;
  border-top: 1px solid #f1f5f9;
  background: #ffffff;
}

.loc-picker-all-btn {
  width: 100%;
  height: 44px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  color: #0f172a;
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.loc-picker-all-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

/* Animations */
@keyframes locFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes locSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes locScaleUp {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
