/* GetYourGuide Bottom Sheet Modal */

.gyg-bottom-sheet {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  pointer-events: none;
}

.gyg-sheet-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.3s ease-out;
  pointer-events: none;
}

.gyg-sheet-container {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80vh;
  max-height: 80vh;
  background-color: white;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  pointer-events: auto;
  overflow: hidden;
}

.gyg-sheet-header {
  padding: 16px 20px;
  border-bottom: 1px solid #efefef;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.gyg-sheet-header-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gyg-sheet-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
}

.gyg-sheet-subtitle {
  font-size: 12px;
  color: #8a8a8a;
}

.gyg-sheet-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background-color 0.2s, color 0.2s;
}

.gyg-sheet-close:hover {
  background-color: #f5f5f5;
  color: #1a1a1a;
}

.gyg-sheet-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  -webkit-overflow-scrolling: touch;
}

.gyg-widget-attribution {
  text-align: center;
  font-size: 12px;
  color: #999;
  margin-top: 12px;
}

.gyg-destination-picker {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gyg-destination-title {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
}

.gyg-destination-sub {
  font-size: 12px;
  color: #8a8a8a;
}

.gyg-destination-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gyg-destination-chip {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #e3e3e3;
  background: #f7f7f7;
  color: #1a1a1a;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.gyg-destination-chip:hover {
  background: #efefef;
}

.gyg-empty {
  font-size: 12px;
  color: #999;
}

/* Widget injection styles */
.gyg-sheet-body [data-gyg-partner-id] {
  min-height: 400px;
}

/* Unmapped state message */
.gyg-unmapped-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  padding: 40px 20px;
}

.gyg-unmapped-state h3 {
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
}

.gyg-unmapped-state p {
  margin: 0 0 20px 0;
  font-size: 14px;
  color: #666;
  line-height: 1.5;
}

.gyg-unmapped-state a {
  display: inline-block;
  padding: 10px 20px;
  background-color: #1a1a1a;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.2s;
}

.gyg-unmapped-state a:hover {
  background-color: #333;
}

/* Loading spinner */
.gyg-loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 16px;
}

.gyg-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f0f0f0;
  border-top-color: #1a1a1a;
  border-radius: 50%;
  animation: gyg-spin 0.8s linear infinite;
}

@keyframes gyg-spin {
  to { transform: rotate(360deg); }
}

.gyg-loading-spinner p {
  margin: 0;
  font-size: 14px;
  color: #666;
}

/* Open state */
.gyg-bottom-sheet.gyg-sheet-open {
  pointer-events: auto;
}

.gyg-bottom-sheet.gyg-sheet-open .gyg-sheet-overlay {
  opacity: 1;
  pointer-events: auto;
}

.gyg-bottom-sheet.gyg-sheet-open .gyg-sheet-container {
  transform: translateY(0);
}

/* Widget container */
.gyg-widget-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 300px;
}

.gyg-widget-container [data-gyg-partner-id] {
  width: 100%;
  min-height: 400px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .gyg-sheet-container {
    height: 90vh;
    max-height: 90vh;
  }

  .gyg-sheet-body {
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .gyg-sheet-header {
    padding: 12px 16px;
  }

  .gyg-sheet-title {
    font-size: 16px;
  }

  .gyg-sheet-body {
    padding: 12px;
  }
}
