/* Cruise Widget Tabbed - Royal Caribbean & Celebrity Cruises */

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

/* ─── Tab Bar ─────────────────────────────────────────────────────── */

.cruise-widget-tabbed {
  max-width: 1200px;
  margin: 0 auto;
}

.tab-bar {
  display: flex;
  gap: 0;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}

.tab-btn {
  flex: 1;
  padding: 18px 30px;
  font-family: "Lato", sans-serif;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  color: rgba(255, 255, 255, 0.7);
  position: relative;
}

/* RC tab (default / left) */
.tab-btn[data-tab="rc"] {
  background: #146fa3;
}

.tab-btn[data-tab="rc"].active {
  background: #188fcf;
  color: white;
  box-shadow: 0 -3px 0 0 #f26722 inset;
}

.tab-btn[data-tab="rc"]:hover:not(.active) {
  background: #1680ba;
  color: rgba(255, 255, 255, 0.9);
}

/* Celebrity tab (right) */
.tab-btn[data-tab="celebrity"] {
  background: #003d61;
}

.tab-btn[data-tab="celebrity"].active {
  background: #005281;
  color: white;
  box-shadow: 0 -3px 0 0 #f26722 inset;
}

.tab-btn[data-tab="celebrity"]:hover:not(.active) {
  background: #004872;
  color: rgba(255, 255, 255, 0.9);
}

/* Active tab indicator bar */
.tab-btn.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #f26722;
}

/* ─── Tab Content ─────────────────────────────────────────────────── */

.tab-content {
  /* Hidden by default; controlled via inline style in JS */
}

/* ─── Core Widget (same as existing) ──────────────────────────────── */

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

/* When inside tabbed widget, remove top border-radius (tabs handle it) */
.cruise-widget-tabbed .cruise-widget {
  border-radius: 0 0 12px 12px;
}

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

/* Celebrity tab gets its own filter header color */
#tab-content-celebrity .filter-header {
  background: linear-gradient(135deg, #005281 0%, #188fcf 100%);
}

.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;
}

.filter-row {
  display: grid;
  grid-template-columns: repeat(5, 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);
}

/* Celebrity tab focus color */
#tab-content-celebrity .filter-group select:focus,
#tab-content-celebrity .filter-group input:focus {
  border-color: #005281;
  box-shadow: 0 0 0 4px rgba(13, 109, 110, 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;
}

/* Exclusives checkbox control */
.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;
}

/* Celebrity tab checkbox accent */
#tab-content-celebrity .checkbox-label input[type="checkbox"] {
  accent-color: #005281;
}

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

/* Tooltip */
.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;
}

/* Celebrity tab tooltip icon color */
#tab-content-celebrity .tooltip-icon {
  background: #005281;
}

.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%);
  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%);
  color: white;
  padding: 20px 30px;
  font-weight: 600;
}

.results-header span[id$="-results-count"] {
  font-size: 13px;
  font-weight: normal;
  opacity: 0.9;
}

/* Destination column */
.destination {
  font-size: 14px;
  color: #334155;
  font-weight: 500;
  text-align: center;
}

.column-headers {
  display: grid;
  grid-template-columns: 2fr 1fr 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;
}

.result-row {
  display: grid;
  grid-template-columns: 2fr 1fr 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;
}

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

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

/* Celebrity tab cruise line color */
#tab-content-celebrity .cruise-line {
  color: #005281;
}

.itinerary {
  font-size: 14px;
  color: #334155;
  font-weight: 500;
  margin-top: 4px;
}

.product {
  font-size: 14px;
  color: #334155;
  font-weight: 500;
  text-align: center;
}

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

.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;
  text-decoration: underline;
}

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

/* 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;
}

.cabin-type {
  text-align: center;
}

.cabin-badge.interior {
  background: linear-gradient(135deg, #03233b 0%, #324a66 100%);
}

.cabin-badge.balcony {
  background: linear-gradient(135deg, #63bfff 0%, #188fcf 100%);
}

.cabin-badge.neighborhood {
  background: linear-gradient(135deg, #f4a82a 0%, #f26722 100%);
}

.cabin-badge.oceanview {
  background: linear-gradient(135deg, #005281 0%, #188fcf 100%);
}

.cabin-badge.suite,
.cabin-badge.standard {
  background: linear-gradient(135deg, #324a66 0%, #03233b 100%);
}

/* Category */
.category {
  font-size: 14px;
  color: #334155;
  font-weight: 500;
  text-align: center;
}

/* Price Info */
.price-info {
  text-align: right;
  margin-right: 0;
}

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

.price-details {
  font-size: 12px;
  color: #64748b;
  text-align: right;
  font-weight: 500;
}

.tax-info {
  font-size: 11px;
  color: #64748b;
  text-align: right;
  font-weight: 400;
  margin-top: 2px;
}

/* You Save */
.you-save {
  font-size: 20px;
  color: #188fcf;
  font-weight: 600;
  text-align: center;
}

/* Celebrity tab you-save color */
#tab-content-celebrity .you-save {
  color: #005281;
}

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

#tab-content-celebrity .you-save .exclusive {
  color: #005281;
}

/* Book Button */
.book-now {
  text-align: center;
}

.book-btn {
  background: linear-gradient(135deg, #f26722 0%, #f4a82a 100%);
  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;
}

.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;
}

/* Deck plan link */
.deck-plan-link {
  display: block;
  color: #f26722;
  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;
  text-decoration: underline;
}

/* ─── Pagination ──────────────────────────────────────────────────── */

.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;
}

/* Celebrity tab active page button */
#tab-content-celebrity .page-btn.active {
  background: linear-gradient(135deg, #005281 0%, #188fcf 100%);
  border-color: #005281;
}

#tab-content-celebrity .page-btn:hover {
  border-color: #005281;
  color: #005281;
}

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

.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) {
  .tab-bar {
    border-radius: 8px 8px 0 0;
  }

  .tab-btn {
    padding: 14px 16px;
    font-size: 13px;
    letter-spacing: 0.5px;
  }

  .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;
    margin-right: 0;
  }

  .pagination {
    flex-wrap: wrap;
    gap: 6px;
    padding: 20px;
  }

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

/* ─── Typography ──────────────────────────────────────────────────── */

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

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