/*
 * Styling of funnel calendar made with fullcalendar.io library.
 */


/*
 * OVERRIDE FC STYLES & ADD VARIABLES
 */
:root {
  --ccb-primary: #0e2a29;
  --ccb-primary-rgb: 14, 42, 41;
  --ccb-secondary: #f7f1ea;
  --ccb-secondary-rgb: 247, 241, 234;
  --ccb-tertiary: #053838;
  --ccb-tertiary-rgb: 5, 56, 56;
  --ccb-discount: #c2611c;
  --ccb-discount-rgb: 194, 97, 28;
  --fc-today-bg-color: transparent;
  --fc-neutral-bg-color: transparent;
  --ccb-secondary-button-bacground: #c8a075; /* Inspiré de Webflow */
}

body {
  line-height: 1.5;
}

/* Fonts */
#ccb-funnel-calendar > *:not(.fc-toolbar-title) {
  font-family: "DM Sans", sans-serif;
}
#ccb-funnel-calendar .fc-toolbar-title,
.coucoo-back-step1 {
  font-family: "TTTRavels Next", sans-serif;
  font-size: 1.25em;
}

/* Calendar */
#ccb-funnel-calendar {
  padding-bottom: 0;
}
#ccb-funnel-calendar .fc-header-toolbar {
  margin-bottom: 0;
}

/* Arrow disabled */
.fc .fc-button-primary:disabled {
  background-color: unset;
  border: none;
}

/* Delete calendar borders */
.fc-theme-standard td,
.fc-theme-standard th {
  border: none;
}

/* Overwrite calendar opacity */
.fc .fc-bg-event {
  opacity: 1;
}

/* Space between cells */
.fc-dayGridMonth-view .fc-scrollgrid-sync-table {
  border-collapse: separate;
  border-spacing: 0 12px;
}

/* Month display */
.fc-toolbar-title {
  text-transform: uppercase;
}

/* Date display */
.fc-dayGridMonth-view .fc-daygrid-day-number {
  color: var(--ccb-primary);
}

/* Day of week */
.fc-dayGridMonth-view th {
  border-bottom: 1.7px solid rgba(var(--ccb-tertiary-rgb), .3);
  height: 52px;
  vertical-align: middle;
}
.fc-dayGridMonth-view th a {
  text-transform: capitalize;
  color: var(--ccb-primary);
  font-weight: bold;
}

/* Hide last row, full of disabled day (bug from FC) */
.fc-dayGridMonth-view .fc-scrollgrid-sync-table tbody tr:last-child {
  display: none;
}

/* Single day */
.fc-dayGridMonth-view .fc-daygrid-body-natural .fc-daygrid-day-events {
  margin-bottom: 0;
}

@supports (not (-moz-appearance:none)) {

  /* Single day */
  .fc-dayGridMonth-view .fc-daygrid-day-frame::before,
  .fc-dayGridMonth-view .fc-daygrid-day-frame::after,
  .fc-dayGridMonth-view .fc-daygrid-day-events::before,
  .fc-dayGridMonth-view .fc-daygrid-day-events::after,
  .fc-dayGridMonth-view .fc-daygrid-event-harness::before,
  .fc-dayGridMonth-view .fc-daygrid-event-harness::after {
    display: none;
  }
}

/* Jour réservé ou passé */
.fc-dayGridMonth-view .fc-day-past .fc-daygrid-day-number,
.fc-dayGridMonth-view .ccb_day-booked .fc-daygrid-day-number,
.fc-dayGridMonth-view .ccb_day-unavailable .fc-daygrid-day-number {
  text-decoration: line-through;
  opacity: 0.3;
}

/* Afficher en entier les mots qui remplacent les prix*/
.ccb_custom-start-date .fc-event-title,
.ccb_custom-end-date .fc-event-title {
  overflow: visible;
}

/* Selected days */
.fc-dayGridMonth-view .ccb_custom-day-selected,
.fc-dayGridMonth-view .ccb_custom-day-selected .fc-event {
  background-color: #fff !important;
}
.fc-dayGridMonth-view .ccb_custom-day-selected.ccb_custom-end-date,
.fc-dayGridMonth-view .ccb_custom-day-selected.ccb_custom-end-date .fc-event {
  border-top-right-radius: 30px;
  border-bottom-right-radius: 30px;
}
.fc-dayGridMonth-view .ccb_custom-day-selected.ccb_custom-start-date {
  border-top-left-radius: 30px;
  border-bottom-left-radius: 30px;
}

/* Style pour "Arrivée" et "Départ" */
.fc-dayGridMonth-view .ccb_custom-start-date::after,
.fc-dayGridMonth-view .ccb_custom-end-date::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  background-color: var(--ccb-primary);
  margin: auto;
  border-radius: 30px;
}

/* Style pour "Arrivée" */
.fc-dayGridMonth-view .ccb_custom-start-date .fc-event-title::after {
  content: 'Arrivée';
}

/* Style pour "Départ" */
.fc-dayGridMonth-view .ccb_custom-end-date .fc-event-title::after {
  content: 'Départ';
}

/* Style pour les titres (prix) */
.ccb_custom-end-date .fc-event-title::after,
.ccb_custom-start-date .fc-event-title::after {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background-color: var(--ccb-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ccb_custom-day-selected.ccb_custom-start-date .fc-event,
.ccb_custom-start-date .fc-event,
.ccb_custom-day-selected.ccb_custom-end-date .fc-event:not(.ccb_day-booked):not(.ccb_day-unavailable) {
  background-color: var(--ccb-primary) !important;
}

/* Lendemain disponible au départ */
.ccb_custom-next-day-available::after {
  content: "";
  position: absolute;
  background-color: rgba(var(--ccb-tertiary-rgb), .5);
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
}

/* Jours disponibles au départ */
.ccb_custom-day-available:hover,
.ccb_custom-day-available-first,
.ccb_custom-day-available-last {
  border: 1px dashed var(--ccb-primary) !important;
}

/* Style jour promo */
.fc-multimonth td.ccb_day-discounted {
  color: var(--ccb-discount);
}

.ccb_legend-discount::after {
  content: '';
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 10px 0 0 10px;
  border-color: var(--ccb-discount) transparent transparent transparent;
  position: absolute;
  top: 0;
  right: 0;
  display: block;
}

.ccb_custom-start-date .fc-daygrid-day-number,
.ccb_custom-end-date .fc-daygrid-day-number,
.ccb_custom-start-date .fc-event-title,
.ccb_custom-end-date .fc-event-title {
  color: #fff;
}

/* ------------------------------------------------------------------------------------------------------------
/* ---------- CORRECTION AFFICHAGE MULTIMONTH SUR PETITS ECRANS */
@supports (not (-moz-appearance:none)) {

  .ccb_custom-next-day-available,
  .fc-dayGridMonth-view .ccb_custom-start-date,
  .fc-dayGridMonth-view .ccb_custom-end-date {
    position: relative
  }

  .fc-dayGridMonth-view .fc-daygrid-day-bottom {
    display: none;
  }

}


.fc .fc-daygrid-day-top {
  justify-content: center;
}

.fc-event {
  background-color: transparent;
  border: none;
}

.fc-event .fc-event-title-container {
  display: flex;
  justify-content: center;
}

.fc-day:not(.fc-day-past):not(.ccb_day-booked):not(.ccb_day-unavailable) .fc-daygrid-day-number {
  font-weight: bold;
}

.fc-theme-standard .fc-scrollgrid {
  border: none;
}

.fc .fc-button-primary,
.fc .fc-button-primary:hover {
  background-color: transparent;
  border-color: transparent;
}

.fc .fc-button-primary:focus,
.fc .fc-button-primary:target,
.fc .fc-button-primary:active,
.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active {
  background-color: transparent;
  border-color: transparent;
  box-shadow: none;
}

.fc .fc-button .fc-icon {
  color: transparent;
}

.fc .fc-button .fc-icon {
  background: url("../img/ccb-arrows.svg") center no-repeat transparent;
  background-size: 16px auto;
}

.fc .fc-button .fc-icon.fc-icon-chevron-left {
  rotate: -180deg;
}

/* Calendar legend */
.ccb_calendar-legend {
  font-family: "DM Sans", sans-serif;
  background-color: var(--ccb-secondary);
}
.ccb_legend-off {
  color: rgba(var(--ccb-primary-rgb), var(--fc-bg-event-opacity));
}
.ccb_legend-on {
  color: var(--ccb-primary);
}
.ccb_legend-discount {
  color: var(--ccb-discount);
}


/**
 * POPUP
 */
/* Toutes la popup */
.ccb_popup-sejour {
  position: fixed;
  z-index: 10;
  background-color: var(--ccb-primary);
  padding: 30px 30px 20px;
  width: 100%;
  max-width: 320px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: none;
  color: #fff;
}
#ccbSelectedDates.ccb_popup-visible {
  display: block;
}

/* Nom de la cabane */
.ccb_popup-sejour_cabname {
  text-transform: uppercase;
  color: #FFFFFF;
  font-family: "TTTravels Next", sans-serif;
  font-size: 1rem;
  margin-bottom: 10px;
}

/* Affichage des blocks de prix et texte */
.ccb_popup-sejour_price-block,
.ccb_popup-sejour_discount-block {
  display: flex;
  justify-content: space-between;
}
.ccb_popup-sejour_dates,
.ccb_popup-sejour_price-block *,
.ccb_popup-sejour_discount-block *,
.ccb_popup-sejour_total-block * {
  font-size: 0.875rem;
  font-family: DM Sans, sans-serif;
}

/* Alignement des prix */
.ccb_popup-sejour_price-block p:last-child,
.ccb_popup-sejour_discount-block p:last-child {
  text-align: right;
}

/* Affichage de la remise */
.ccb_popup-sejour_discount-block {
  opacity: 0;
  height: 0;
  text-align: right;
}
.ccb_popup-sejour_discount-block.show {
  opacity: 1;
  height: auto;
}

/* Affichage du total */
.ccb_popup-sejour_total-block {
  display: flex;
  justify-content: space-between;
  padding-top: 8px;
  margin-top: 8px;
  border-top: 1px solid #FFFFFF;
}
.ccb_popup-sejour_total-text {
  font-weight: 700;
}

/* CTA */
/* Bouton */
.ccb_sejour_ctas {
  text-align: center;
  margin-top: 10px;
}
#ccb_popup-sejour_btn {
  display: inline-block;
  width: 100%;
  background-color: var(--ccb-secondary-button-bacground);
  color: var(--ccb-primary);
  text-align: center;
  text-transform: uppercase;
  padding: .75rem 2.5rem;
  font-family: "TTTRavels Next", sans-serif;
  font-size: .875rem;
  font-weight: 700;
  border: 0;
  border-radius: 0;
  text-decoration: none;
}

/* Reset */
.ccb_popup-sejour_reset {
  display: inline-block;
  color: #FFFFFF;
  text-decoration: underline;
  margin: 1rem auto 0;
  font-family: DM Sans, sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  text-align: center;
  background-color: transparent;
  border: 0;
  border-radius: 0;
  padding: 9px 15px;
}