@import url("https://fonts.googleapis.com/css2?family=Heebo:wght@300;400;500;700;800&family=IBM+Plex+Sans:wght@300;400;500;600;700&display=swap");

:root {
  --primary: #4199bd;
  --accent: #f0f7ff;
  --accent-color: #4199bd;
  --accent-hover: #347a97;
  --accent-light: #f0f7ff;
  --accent-lighter: #f8fbff;
  --accent-foreground: #074164;
  --radius: 0.75rem;
  --select-item-focus: var(--accent-light);
  --select-item-focus-foreground: var(--accent-foreground);
}

/* CMDK SELECTION COLOR FIX */
[data-slot="command-item"][data-selected="true"],
[data-slot="command-item"][aria-selected="true"],
.data-\[selected\=true\]\:bg-accent[data-selected="true"] {
  background-color: #f0f7ff;
  color: #074164;
}

/* GLOBAL BORDER SOFTENING */
#tp-app-body {
  font-family: "Heebo", sans-serif;
}

* {
  border-color: #e2e8f0;
}

.border-black,
.border-gray-900,
.border-slate-900 {
  border-color: #4199bd; /* Use brand blue for 'strong' borders instead of black */
}

.border-gray-200,
.border-slate-200 {
  border-color: #edf2f7;
}

/* DISABLED INPUTS CONSISTENCY */
.form-input-base:disabled,
.tp-requestpax-trigger:disabled,
.tp-calendar-trigger:disabled,
[disabled] {
  background-color: #f8fafc;
  opacity: 1;
  cursor: default;
  color: #94a3b8;
}

/* INPUT HOVER STYLE - LIGHT BLUE */
.form-input-base:hover,
.tp-requestpax-trigger:hover,
.tp-calendar-trigger:hover {
  background-color: #f8fbff;
  border-color: #4199bd;
}

/* SEARCHBOX BORDER CONSISTENCY */
.searchBox,
.tp-searchbox,
.tp-trip-type-toggle {
  border-radius: var(--radius);
}

.tp-trip-type-toggle {
  overflow: hidden;
  padding: 0;
}

/* Internal buttons of trip type toggle */
.tp-trip-type-toggle button.rounded-l-md,
.tp-trip-type-toggle button.rounded-r-md {
  border-radius: 0 !important;
}

/* LOGIN / RESERVED AREA CARD FIX */
[data-slot="card-header"].from-\[var\(--accent-color\)\] {
  background: linear-gradient(135deg, #4199bd, #347a97);
  color: white;
}

[data-slot="card-title"] {
  color: inherit;
}

.sealines-btn {
  background-color: var(--accent-color);
  color: white;
  font-weight: 700;
  border-radius: var(--radius);
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.sealines-btn:hover {
  background-color: #f8b400;
  transform: translateY(-1px);
}

.tp-search-label {
  font-weight: 700;
  color: #4199bd;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

/* HEADER NAVIGATION */
.sealines-nav-link {
  position: relative;
  transition: color 0.3s ease;
  font-weight: 500;
}

.sealines-nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 2px;
  background-color: #347a97; /* Azzurro Sealines */
  transition: right 0.3s ease-in-out;
}

/* GLOBAL BUTTON OVERRIDES */
.bg-primary {
  background-color: #4199bd;
  color: white;
}

.bg-primary:hover {
  background-color: #347a97;
}

.sealines-nav-link:hover::after {
  right: 0;
}

.sealines-nav-link:hover {
  color: #347a97;
}

.tp-requestpax-dialog .btn-primary:hover {
  background-color: #347a97;
}

/* SEARCH & ACTION BUTTONS: BG, DARK BLUE TEXT */
#tp-app-body .sealines-search-btn,
#tp-app-body .tp-search-button,
#tp-app-body .tp-btn-action,
#tp-app-body .tp-results-proceed-button,
#tp-app-body .results-action-proceed,
#tp-app-body .tp-pay-button,
#tp-app-body .btn-primary,
#tp-app-body .searchBox .tp-search-button {
  background-color: #4199bd;
  color: white;
  font-weight: 800;
  text-transform: uppercase;
  height: 46px;
  border-radius: var(--radius);
  border: none;
  padding: 0 24px;
  font-size: 14px;
  transition: filter 0.2s ease;
}

#tp-app-body .sealines-search-btn:hover,
#tp-app-body .tp-search-button:hover,
#tp-app-body .tp-btn-action:hover,
#tp-app-body .tp-results-proceed-button:hover,
#tp-app-body .results-action-proceed:hover,
#tp-app-body .tp-pay-button:hover,
#tp-app-body .btn-primary:hover {
  filter: brightness(0.92);
  background-color: #4199bd;
}

/* RESET FOR NON-YELLOW PRIMARY BUTTONS (like Login) */
#tp-app-body .tp-requestpax-dialog .btn-primary,
#tp-app-body .results-action-back.btn-primary,
#tp-app-body
  .bg-primary:not(.tp-search-button):not(.tp-btn-action):not(
    .tp-results-proceed-button
  ):not(.tp-pay-button) {
  background-color: #4199bd;
  color: white;
}

.tp-btn-secondary,
.tp-back-button,
.contact-back-button,
.results-action-back {
  background-color: white;
  color: #4199bd;
  border: 1px solid #4199bd;
  font-weight: 800;
  text-transform: uppercase;
  height: 46px;
  border-radius: var(--radius);
  padding: 0 24px;
  font-size: 14px;
}

.btn-custom-outline {
  background-color: white;
  color: #4199bd;
  border: 1px solid #4199bd;
  font-weight: 800;
  text-transform: none;
}

.tp-btn-secondary:hover,
.tp-back-button:hover,
.contact-back-button:hover,
.results-action-back:hover,
.btn-custom-outline:hover {
  background-color: #e0f2fe;
  color: #4199bd;
  transition: all 0.2s ease;
}

/* FIX DATE VISIBILITY (NO YELLOW) */
.text-accent-custom\/80,
.text-accent-custom {
  color: #074164; /* Force Dark Blue for readability in text */
}

.bg-accent-custom\/5 {
  background-color: #f0f7ff;
}

.border-accent-custom\/10 {
  border-color: rgba(65, 153, 189, 0.1);
}

.tp-summary-route .text-accent-custom {
  color: #074164;
}

.fare-badge {
  background-color: #347a97;
  color: white;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11px;
  text-transform: uppercase;
}

/* PASSENGER DIALOG BUTTON: THEME COHERENT */
.tp-requestpax-dialog .btn-primary {
  background-color: #4199bd;
  color: white;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  box-shadow: none;
}

.tp-requestpax-dialog .btn-primary:hover {
  background-color: #347a97;
}

/* TRIP TYPE TOGGLE STYLES */
.tp-trip-type-toggle {
  border: 1px solid #4199bd;
  background-color: white;
}

.tp-trip-type-toggle button {
  flex: 1;
  padding: 10px 20px;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  transition: all 0.2s ease;
  border: none;
}

.tp-trip-type-toggle button.active {
  background-color: #4199bd;
  color: white;
}

.tp-trip-type-toggle button.inactive {
  background-color: transparent;
  color: #4199bd;
}

.tp-trip-type-toggle button.inactive:hover {
  background-color: rgba(65, 153, 189, 0.05);
}

/* FOOTER STYLES */
.sealines-footer a {
  transition: filter 0.3s ease;
}

.text-accent-custom {
  color: #074164;
}

/* RESULTS PAGE REFINEMENT: REDUCE DARKNESS */
.pg_results {
  background-color: #fdfdfd;
}

.pg_results .text-gray-900,
.pg_results .text-gray-800,
.pg_results h1,
.pg_results h2,
.pg_results h3,
.pg_results h4 {
  color: #4199bd; /* Brand Blue instead of Black */
}

.pg_results .text-gray-700,
.pg_results .text-gray-600 {
  color: #4a5568;
}

.pg_results .border-gray-200,
.pg_results .divide-gray-200,
.pg_results .Separator {
  border-color: #edf2f7;
}

.pg_results .shadow-xl,
.pg_results .shadow-lg,
.tp-trip-card {
  box-shadow:
    0 10px 15px -3px rgba(65, 153, 189, 0.05),
    0 4px 6px -2px rgba(65, 153, 189, 0.02);
  border: 1px solid #edf2f7;
}

.tp-section-title {
  color: #4199bd;
}

/* TRIP SOLUTION CARD SPECIFICS */
.tp-trip-card .text-xl.font-extrabold {
  color: #4199bd;
}

.tp-trip-card .text-gray-400 {
  color: #94a3b8;
}

.tp-solution-box.is-available:hover {
  background-color: #f0f7ff;
}

.tp-solution-box.is-selected {
  background-color: #e0f2fe;
}

.tp-solution-box .text-2xl.font-bold {
  color: #074164;
}

/* DISCOUNT BADGE */
.tp-discount-circle {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 40px;
  height: 40px;
  background-color: #f8b400;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  z-index: 5;
}

/* SEARCH TERMS CLASSES */
.condizioni {
  font-size: 12px;
  color: #718096;
}

.condizioni .color1 {
  color: #4199bd;
}

.condizioni .color2 {
  color: #4199bd;
}

/* SWITCH COLORS CONSISTENCY */
.tp-return-switch[data-state="unchecked"],
.tp-residents-switch[data-state="unchecked"] {
  background-color: #e2e8f0;
}

.tp-return-switch[data-state="checked"],
.tp-residents-switch[data-state="checked"] {
  background-color: var(--primary);
}

/* CALENDAR TODAY - CELESTE CHIARO */
.rdp-today {
  background-color: #e0f2fe;
  color: #074164;
  border-radius: 0.375rem;
}

.rdp-day
  button:hover:not([data-selected-single="true"]):not(
    [data-range-start="true"]
  ):not([data-range-end="true"]) {
  background-color: #4199bd;
  color: white;
}

.rdp-today [data-selected-single="true"] {
  background-color: #4199bd;
  color: white;
}

/* LOADER COLOR */
.tp-loader-overlay .text-accent-custom {
  color: #4199bd;
}

/* DROPDOWN & SELECT HOVER REFINEMENTS */
.item-focus-light,
.hover\:item-focus-light:hover {
  background-color: var(--accent-light);
}

[data-slot="select-item"]:focus {
  background-color: var(--accent-light);
  color: var(--accent-foreground);
}

.tp-vehicle-dropdown li.item-focus-light,
.tp-vehicle-dropdown li:hover {
  background-color: var(--accent-light);
}
