/**
 * Breakdance-Friendly Signature API Styles
 * Form styling removed - only results styling kept
 * Uses CSS custom properties for easy Breakdance customization
 */

:root {
  /* Color Variables - Easy to customize in Breakdance */
  --signature-primary: #007cba;
  --signature-secondary: #28a745;
  --signature-accent: #ffc107;
  --signature-text: #333333;
  --signature-text-light: #666666;
  --signature-bg: #ffffff;
  --signature-bg-light: #f8f9fa;
  --signature-border: #e1e5e9;
  --signature-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --signature-shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.15);
  
  /* Spacing Variables */
  --signature-spacing-xs: 0.25rem;
  --signature-spacing-sm: 0.5rem;
  --signature-spacing-md: 1rem;
  --signature-spacing-lg: 1.5rem;
  --signature-spacing-xl: 2rem;
  
  /* Border Radius */
  --signature-radius-sm: 4px;
  --signature-radius-md: 8px;
  --signature-radius-lg: 12px;
  
  /* Typography */
  --signature-font-size-sm: 0.875rem;
  --signature-font-size-base: 1rem;
  --signature-font-size-lg: 1.125rem;
  --signature-font-size-xl: 1.25rem;
  --signature-font-size-2xl: 1.5rem;
  --signature-font-size-3xl: 2rem;
}

/* Tab functionality */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Results Container */
.search-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--signature-spacing-lg);
  margin-top: var(--signature-spacing-xl);
}

/* Breakdance Result Items */
.breakdance-result-item {
  /* This class can be styled in Breakdance */
  transition: transform 0.3s ease;
}

.breakdance-result-item:hover {
  transform: translateY(-4px);
}

/* Offer Cards */
.offer-card {
  background: var(--signature-bg);
  border-radius: var(--signature-radius-lg);
  overflow: hidden;
  box-shadow: var(--signature-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.offer-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--signature-shadow-hover);
}

.offer-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

/* Offer Image */
.offer-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
}

.offer-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.offer-card:hover .offer-image img {
  transform: scale(1.05);
}

/* Hotel-specific image height */
.hotel-card .offer-image {
  height: 220px;
}

/* Offer Content */
.offer-content {
  padding: var(--signature-spacing-lg);
  position: relative;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

/* Supplier Logo */
.supplier-logo {
  position: absolute;
  top: calc(-1 * var(--signature-spacing-lg));
  right: var(--signature-spacing-md);
  background: var(--signature-bg);
  padding: var(--signature-spacing-sm);
  border-radius: var(--signature-radius-md);
  box-shadow: var(--signature-shadow);
  max-width: 80px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.supplier-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Typography */
.offer-title {
  font-size: var(--signature-font-size-xl);
  font-weight: 600;
  margin-bottom: var(--signature-spacing-sm);
  color: var(--signature-text);
  line-height: 1.3;
  flex-grow: 1;
}

.offer-subtitle {
  font-size: var(--signature-font-size-lg);
  color: var(--signature-primary);
  font-weight: 600;
  margin-bottom: var(--signature-spacing-md);
}

/* Offer Details */
.offer-details-list {
  list-style: none;
  padding: 0;
  margin: var(--signature-spacing-md) 0;
}

.offer-details-list li {
  display: flex;
  justify-content: space-between;
  padding: var(--signature-spacing-xs) 0;
  font-size: var(--signature-font-size-sm);
  color: var(--signature-text-light);
}

.offer-details-list .label {
  font-weight: 600;
  color: var(--signature-text);
}

.offer-details-list .value {
  font-weight: 600;
  color: var(--signature-text);
}

/* Offer ID */
.offer-id {
  position: absolute;
  top: var(--signature-spacing-md);
  right: var(--signature-spacing-md);
  background: var(--signature-primary);
  color: white;
  padding: var(--signature-spacing-xs) var(--signature-spacing-sm);
  border-radius: var(--signature-radius-sm);
  font-size: var(--signature-font-size-sm);
  font-weight: 600;
}

/* Type-specific styling */
.cruise-card {
  border-left: 4px solid var(--signature-primary);
}

.hotel-card {
  border-left: 4px solid var(--signature-secondary);
}

.tour-card {
  border-left: 4px solid var(--signature-accent);
}

/* Loading and Error States */
.loader {
  text-align: center;
  padding: var(--signature-spacing-xl);
  font-size: var(--signature-font-size-lg);
  color: var(--signature-text-light);
}

.error-message,
.no-results {
  text-align: center;
  padding: var(--signature-spacing-xl);
  font-size: var(--signature-font-size-lg);
  color: var(--signature-text-light);
  background: var(--signature-bg-light);
  border-radius: var(--signature-radius-md);
  margin: var(--signature-spacing-md) 0;
}

.error-message {
  color: #dc3545;
  background: #f8d7da;
}

/* Responsive Design */
@media (max-width: 768px) {
  .search-results {
    grid-template-columns: 1fr;
  }
  
  .supplier-logo {
    position: static;
    margin-bottom: var(--signature-spacing-md);
    max-width: 100px;
  }
}

/* Breakdance Customization Hooks */
[data-breakdance-stylable="true"] {
  /* This class can be targeted in Breakdance for custom styling */
}

/* Loading States - Essential for functionality */
.field-group select.loading {
  opacity: 0.7;
  background: var(--signature-bg-light);
}

.search-button.loading {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Skeleton Loading Animation */
@keyframes shimmer {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}

.skeleton-shimmer {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--signature-radius-sm);
}

/* Skeleton Card Styles */
.skeleton-card {
  pointer-events: none;
}

.skeleton-image {
  background: #f0f0f0;
  height: 200px;
  border-radius: var(--signature-radius-md);
  overflow: hidden;
}

.skeleton-logo {
  background: #f0f0f0;
  width: 60px;
  height: 30px;
  border-radius: var(--signature-radius-sm);
}

.skeleton-title {
  height: 24px;
  margin-bottom: var(--signature-spacing-sm);
}

.skeleton-subtitle {
  height: 20px;
  margin-bottom: var(--signature-spacing-md);
  width: 70%;
}

.skeleton-details {
  margin-top: var(--signature-spacing-md);
}

.skeleton-details .skeleton-shimmer {
  height: 16px;
  margin-bottom: var(--signature-spacing-xs);
}

.skeleton-details .skeleton-shimmer:last-child {
  width: 60%;
}

/* CSS Custom Properties for Easy Breakdance Overrides */
.signature-search-container {
  --custom-primary: var(--signature-primary);
  --custom-secondary: var(--signature-secondary);
  --custom-accent: var(--signature-accent);
  --custom-text: var(--signature-text);
  --custom-bg: var(--signature-bg);
  --custom-spacing: var(--signature-spacing-md);
  --custom-radius: var(--signature-radius-md);
}