/* Pickup Point Selection Modal */
/* Hide modal before Vue initializes to prevent flash */
.pickup-modal[v-show] {
  display: none !important;
}

.pickup-modal {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  padding: 24px;
  background-color: rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.3s ease;
}

.pickup-modal-content {
  position: relative;
  background: #fff;
  border-radius: 12px;
  width: 90%;
  max-width: 1200px;
  height: 80vh;
  max-height: 800px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  animation: slideUp 0.3s ease;
}

.pickup-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #e0e0e0;
}

.pickup-modal-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: #333;
}

.pickup-modal-close {
  background: none;
  border: none;
  font-size: 28px;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}

.pickup-modal-close:hover {
  background: #f5f5f5;
  color: #333;
}

.pickup-modal-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.pickup-map-container {
  flex: 1;
  position: relative;
  min-height: 400px;
}

/* Map container - supports multiple map IDs */
.pickup-map-container > div {
  width: 100% !important;
  height: 100% !important;
  min-height: 400px !important;
  position: absolute !important;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

#pickup-map,
#catalog-pickup-map,
#product-pickup-map,
#cart-pickup-map {
  width: 100% !important;
  height: 100% !important;
}

.pickup-list-container {
  width: 400px;
  border-left: 1px solid #e0e0e0;
  display: flex;
  flex-direction: column;
}

.pickup-search {
  padding: 16px;
  border-bottom: 1px solid #e0e0e0;
}

.pickup-search input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.2s;
}

.pickup-search input:focus {
  outline: none;
  border-color: #e80052;
}

.pickup-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.pickup-item {
  padding: 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.pickup-item:hover {
  border-color: #e80052;
  background: #fff5f8;
}

.pickup-item.selected {
  border-color: #e80052;
  background: #ffe8f0;
  box-shadow: 0 0 0 3px rgba(232, 0, 82, 0.15);
}

.pickup-item.selected::before {
  content: '';
  position: absolute;
  top: 12px;
  right: 12px;
  width: 24px;
  height: 24px;
  background: #e80052;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pickup-item.selected::after {
  content: '';
  position: absolute;
  top: 17px;
  right: 20px;
  width: 6px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.pickup-item-name {
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
  font-size: 15px;
  padding-right: 30px;
}

.pickup-item-address {
  color: #666;
  font-size: 13px;
  margin-bottom: 8px;
  line-height: 1.4;
}

.pickup-item-schedule {
  color: #888;
  font-size: 12px;
  margin-bottom: 4px;
}

.pickup-item-phone {
  color: #888;
  font-size: 12px;
}

.pickup-item-phone a {
  color: #e80052;
  text-decoration: none;
}

.pickup-item-phone a:hover {
  text-decoration: underline;
}

.pickup-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #e0e0e0;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.pickup-modal-footer button {
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.pickup-cancel-btn {
  background: #f5f5f5;
  color: #333;
}

.pickup-cancel-btn:hover {
  background: #e0e0e0;
}

.pickup-confirm-btn {
  background: #e80052;
  color: #fff;
}

.pickup-confirm-btn:hover {
  background: #d00048;
}

.pickup-confirm-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.pickup-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
  color: #666;
}

.pickup-error {
  padding: 20px;
  color: #e80052;
  text-align: center;
}

/* Selected Pickup Display */
.selected-pickup-display {
  margin-top: 12px;
  padding: 12px;
  background: #f9f9f9;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.selected-pickup-name {
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
  font-size: 14px;
}

.selected-pickup-address {
  color: #666;
  font-size: 13px;
}

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

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ===== RESPONSIVE STYLES ===== */

/* Tablets */
@media (max-width: 968px) {
  .pickup-modal-content {
    width: 95%;
    max-width: 900px;
    height: 85vh;
  }
  
  .pickup-list-container {
    width: 350px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .pickup-modal {
    padding: 0;
    align-items: flex-end;
  }
  
  .pickup-modal-content {
    width: 100%;
    height: 90vh;
    max-height: none;
    border-radius: 20px 20px 0 0;
    flex-direction: column;
  }
  
  .pickup-modal-header {
    padding: 16px 20px;
    border-radius: 20px 20px 0 0;
  }
  
  .pickup-modal-header h2 {
    font-size: 18px;
  }
  
  .pickup-modal-close {
    font-size: 24px;
    width: 28px;
    height: 28px;
  }

  .pickup-modal-body {
    flex-direction: column;
    flex: 1;
    overflow: hidden;
  }

  .pickup-map-container {
    height: 35%;
    min-height: 200px;
    flex: none;
  }

  .pickup-list-container {
    width: 100%;
    height: 65%;
    flex: 1;
    border-left: none;
    border-top: 1px solid #e0e0e0;
  }
  
  .pickup-search {
    padding: 12px;
  }
  
  .pickup-search input {
    padding: 10px 14px;
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  .pickup-list {
    padding: 12px;
  }
  
  .pickup-item {
    padding: 14px;
    margin-bottom: 10px;
    border-radius: 10px;
  }
  
  .pickup-item-name {
    font-size: 14px;
  }
  
  .pickup-item-address {
    font-size: 12px;
  }
  
  .pickup-item-schedule,
  .pickup-item-phone {
    font-size: 11px;
  }
  
  .pickup-modal-footer {
    padding: 14px 20px;
    gap: 10px;
    flex-direction: column-reverse;
  }
  
  .pickup-modal-footer button {
    width: 100%;
    padding: 14px 20px;
    font-size: 15px;
  }
  
  .pickup-cancel-btn {
    background: transparent;
    border: 2px solid #e0e0e0;
  }
  
  /* Selected pickup display */
  .selected-pickup-display {
    margin-top: 10px;
    padding: 10px;
  }
  
  .selected-pickup-name {
    font-size: 13px;
  }
  
  .selected-pickup-address {
    font-size: 12px;
  }
}

/* Small mobile phones */
@media (max-width: 480px) {
  .pickup-modal-content {
    height: 95vh;
  }
  
  .pickup-map-container {
    height: 30%;
    min-height: 180px;
  }
  
  .pickup-list-container {
    height: 70%;
  }
  
  .pickup-item {
    padding: 12px;
  }
  
  .pickup-modal-header h2 {
    font-size: 16px;
  }
}
