/* Cruise Widget - Modern Search Design */

@import url("https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&family=Playfair+Display:wght@700,900&display=swap");

.cruise-widget {
  font-family: "Lato", sans-serif;
  max-width: 1200px;
  margin: 0 auto;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Modern Filter Header */
.filter-header {
  background: linear-gradient(135deg, #188fcf 0%, #63bfff 100%); /* Coastal Blue to Ocean Sky */
  color: white;
  padding: 20px 30px;
  font-weight: 600;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 12px 12px 0 0;
}

.toggle-arrow {
  transition: transform 0.3s ease;
  font-size: 14px;
}

.toggle-arrow.collapsed {
  transform: rotate(-90deg);
}

/* Modern Filters Section */
.filters-section {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  padding: 30px;
  border-bottom: none;
  transition: max-height 0.3s ease;
  overflow: hidden;
}

.filters-section.collapsed {
  max-height: 0;
  padding: 0 30px;
}

/* Updated filter row to accommodate 4 filter groups instead of 5 */
.filter-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.filter-row-2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.filter-group {
  position: relative;
  display: flex;
  flex-direction: column;
}

.filter-group label {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-group select,
.filter-group input {
  padding: 14px 16px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  font-size: 15px;
  background: rgba(255, 255, 255, 0.9);
  color: #334155;
  font-weight: 500;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.filter-group select:focus,
.filter-group input:focus {
  outline: none;
  border-color: #188fcf;
  background: white;
  box-shadow: 0 0 0 4px rgba(24, 143, 207, 0.1);
}

.filter-group select:hover,
.filter-group input:hover {
  border-color: #63bfff;
  background: white;
}

/* Date input styling */
.filter-group input[type="date"] {
  position: relative;
}

.filter-group input[type="date"]::-webkit-calendar-picker-indicator {
  color: #188fcf;
  cursor: pointer;
}

.controls-group {
  display: flex;
  align-items: center;
  gap: 20px;
}

.show-control,
.sort-control,
.savings-sort-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.show-control label {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.show-control select,
.sort-control select,
.savings-sort-control select {
  padding: 10px 14px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 6px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.9);
  color: #334155;
  font-weight: 500;
  min-width: 120px;
}

/* Added exclusives checkbox control styling */
.exclusives-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  accent-color: #188fcf;
}

.checkbox-text {
  white-space: nowrap;
}

/* Added tooltip styling for exclusives explanation */
.tooltip {
  position: relative;
  display: inline-block;
  margin-left: 4px;
}

.tooltip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background: #188fcf;
  color: white;
  border-radius: 50%;
  font-size: 10px;
  font-weight: bold;
  cursor: help;
}

.tooltip-content {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background: #334155;
  color: white;
  text-align: center;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  width: 280px;
  z-index: 1000;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: opacity 0.3s ease, visibility 0.3s ease;
  text-transform: none;
  letter-spacing: normal;
}

.tooltip-content::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #334155 transparent transparent transparent;
}

.tooltip:hover .tooltip-content {
  visibility: visible;
  opacity: 1;
}

/* Modern Search Button */
.search-btn {
  background: linear-gradient(135deg, #f26722 0%, #f4a82a 100%); /* Sunset to Sun Kissed */
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(242, 103, 34, 0.3);
}

.search-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(242, 103, 34, 0.4);
}

.clear-all-btn {
  background: transparent;
  color: #64748b;
  border: 2px solid rgba(100, 116, 139, 0.3);
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.clear-all-btn:hover {
  background: rgba(100, 116, 139, 0.1);
  border-color: #64748b;
  color: #334155;
}

/* Results Section */
.results-section {
  background: white;
}

.results-header {
  background: linear-gradient(135deg, #f26722 0%, #f4a82a 100%); /* Sunset to Sun Kissed */
  color: white;
  padding: 20px 30px;
  font-weight: 600;
}

.results-header #results-count {
  font-size: 13px;
  font-weight: normal;
  opacity: 0.9;
}

.column-headers {
  display: grid;
  /* Updated grid to 8 columns for You Save column */
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
  gap: 15px;
  margin-top: 15px;
  font-size: 12px;
  text-transform: uppercase;
  font-weight: bold;
  letter-spacing: 0.5px;
}

.column-headers span {
  text-align: center;
}

.column-headers span:first-child {
  text-align: left; /* Keep ship info left-aligned */
}

.results-table {
  background: white;
}

.result-row {
  display: grid;
  /* Updated grid to 8 columns for You Save column */
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
  gap: 15px;
  padding: 25px 30px;
  border-bottom: 1px solid #f1f5f9;
  align-items: center;
  transition: all 0.3s ease;
}

.result-row:nth-child(even) {
  background: #fafbfc;
}

.result-row:nth-child(odd) {
  background: white;
}

.result-row:hover {
  background: #f0f9ff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* Ship Info */
.ship-info {
  display: flex;
  flex-direction: column;
  /* Keep ship info left-aligned */
}

.ship-name {
  font-size: 20px;
  font-family: "Playfair Display", serif;
  font-weight: 700;
  color: #f26722; /* Sunset orange */
  margin-bottom: 4px;
}

.cruise-line {
  font-size: 14px;
  color: #188fcf; /* Coastal Blue */
  font-weight: 500;
}

/* Sail Date */
.sail-date {
  font-size: 14px;
  color: #334155;
  font-weight: 500;
  text-align: center; /* Center sail dates under SAIL DATE header */
}

/* Added styling for clickable sail date links */
.sail-date-link {
  color: #334155;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.sail-date-link:hover {
  color: #f26722; /* Brand orange on hover */
  text-decoration: underline;
}

/* Duration */
.duration {
  font-size: 14px;
  color: #334155;
  font-weight: 500;
  text-align: center; /* Center nights under DURATION header */
}

/* Cabin Type */
.cabin-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: white;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  margin: 0 auto; /* Center the badge */
}

.cabin-type {
  text-align: center; /* Center cabin type chips under CABIN TYPE header */
}

.cabin-badge.interior {
  background: linear-gradient(135deg, #03233b 0%, #324a66 100%); /* Deep Blue Sea to Twilight Blue */
}

.cabin-badge.balcony {
  background: linear-gradient(135deg, #63bfff 0%, #188fcf 100%); /* Ocean Sky to Coastal Blue */
}

.cabin-badge.neighborhood {
  background: linear-gradient(135deg, #f4a82a 0%, #f26722 100%); /* Sun Kissed to Sunset */
}

.cabin-badge.oceanview {
  background: linear-gradient(135deg, #005281 0%, #188fcf 100%); /* Cool Horizon to Coastal Blue */
}

/* Fallback for any other cabin types */
.cabin-badge.suite,
.cabin-badge.standard {
  background: linear-gradient(135deg, #324a66 0%, #03233b 100%); /* Twilight Blue to Deep Blue Sea */
}

/* Added Category column styling */
.category {
  font-size: 14px;
  color: #334155;
  font-weight: 500;
  text-align: center; /* Center category codes under CATEGORY header */
}

/* Price Info */
.price-info {
  text-align: right; /* Keep FROM PRICE right-aligned as requested */
  margin-right: 0;
}

.price {
  font-size: 24px;
  font-family: "Lato", sans-serif;
  font-weight: 600;
  color: #f26722; /* Sunset orange */
  margin-bottom: 4px;
}

.price-details {
  font-size: 12px;
  color: #64748b;
  text-align: right; /* Keep FROM PRICE right-aligned as requested */
  font-weight: 500;
}

/* Added tax info styling to match the pricing format */
.tax-info {
  font-size: 11px;
  color: #64748b;
  text-align: right; /* Keep FROM PRICE right-aligned as requested */
  font-weight: 400;
  margin-top: 2px;
}

/* Updated You Save column styling to use #188fcf color and larger font size */
.you-save {
  font-size: 20px; /* Increased from 14px to be larger but slightly smaller than the 24px price */
  color: #188fcf;
  font-weight: 600;
  text-align: center; /* Center You Save percentages under YOU SAVE header */
}

.you-save .exclusive {
  font-size: 16px; /* Smaller than percentage */
  color: #188fcf;
  font-weight: 500;
  font-style: italic;
  text-align: center;
}

/* Book Button */
.book-now {
  text-align: center; /* Center Book Now buttons under BOOK NOW header */
}

.book-btn {
  background: linear-gradient(135deg, #f26722 0%, #f4a82a 100%); /* Sunset to Sun Kissed */
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  box-shadow: 0 3px 12px rgba(242, 103, 34, 0.3);
  display: inline-block; /* Make button inline-block for proper centering */
}

.book-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(242, 103, 34, 0.4);
}

.book-btn:disabled {
  background: #cbd5e1;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Added deck plan link styling */
.deck-plan-link {
  display: block;
  color: #f26722; /* Changed from blue to brand orange */
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  margin-top: 8px;
  transition: color 0.3s ease;
}

.deck-plan-link:hover {
  color: #d4551a; /* Darker orange on hover */
  text-decoration: underline;
}

/* Added simple pagination styles that match existing design */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 30px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.page-btn {
  background: white;
  border: 2px solid #e2e8f0;
  color: #64748b;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 44px;
  text-align: center;
}

.page-btn:hover {
  background: #f0f9ff;
  border-color: #188fcf;
  color: #188fcf;
}

.page-btn.active {
  background: linear-gradient(135deg, #188fcf 0%, #63bfff 100%);
  border-color: #188fcf;
  color: white;
  font-weight: 600;
}

.page-btn:disabled {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #cbd5e1;
  cursor: not-allowed;
}

/* Added pagination ellipsis styling for truncated pagination */
.pagination-ellipsis {
  color: #64748b;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
}

/* Loading and Error States */
.loading,
.no-results,
.error {
  text-align: center;
  padding: 60px 30px;
  color: #64748b;
}

.error {
  color: #dc2626;
}

.error button {
  background: #dc2626;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 15px;
  font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
  .filter-row {
    grid-template-columns: 1fr;
  }

  .filter-row-2 {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }

  .controls-group {
    flex-wrap: wrap;
    justify-content: center;
  }

  .column-headers {
    display: none;
  }

  .result-row {
    grid-template-columns: 1fr;
    gap: 15px;
    text-align: center;
    padding: 20px;
  }

  .ship-info {
    text-align: center;
  }

  .price-info {
    text-align: right; /* Keep FROM PRICE right-aligned as requested */
    margin-right: 0;
  }

  /* Added responsive pagination styles */
  .pagination {
    flex-wrap: wrap;
    gap: 6px;
    padding: 20px;
  }

  .page-btn {
    padding: 8px 12px;
    font-size: 13px;
    min-width: 36px;
  }
}

h1,
h2,
h3 {
  font-family: "Playfair Display", serif;
  font-weight: 900;
}

h4,
h5,
h6 {
  font-family: "Playfair Display", serif;
  font-weight: 700;
}
