:root {
	--light: #F9F0DB;
	--yellow: #FFD676;
    --transyellow: rgba(255, 214, 118, 0.9);
    --transblue: rgba(30, 66, 105, 0.9);
	--blue: #2381CF;
	--darkblue: #1E4269;	
	--darkyellow: #ebbd4d;
    --success: #1e7e34;
}

.baes-calendar-wrapper {
    overflow: hidden;
}

.baes-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    padding: 1em;
    display: none;
}

.baes-modal.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
}

.baes-modal-title {
    margin: 0 0 .5em;
}
.baes-modal-footer {
    margin-top: 1em;
    display: flex;
    gap: 1em;
}
.baes-modal p {
    margin: 0;
}
#baes-legal-form p {
    margin: .5em 0;
}
.baes-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 100000;
}

.baes-modal-dialog {
    position: relative;
    max-width: 480px;
    width: 100%;
    margin: 0;
    background: #fff;
    padding: 20px;
    border-radius: 6px;
    z-index: 100001;
    max-height: calc(100vh - 2em);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

body.baes-modal-open {
    overflow: hidden;
}

.baes-floating-cta {
    position: absolute;
    top: 80vh;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    pointer-events: none;
}

.baes-floating-cta__btn {
    pointer-events: auto;
    display: inline-block;
    padding: 12px 16px;
    border-radius: 999px;
    background: var(--darkblue);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.baes-floating-cta__btn:hover,
.baes-floating-cta__btn:focus {
    background: var(--blue);
    color: #fff;
    text-decoration: none;
}

.baes-purchase-message {
    margin-bottom: .75em;
}

.baes-message-modal-success #baes-message-title {
    color: var(--success);
}

.baes-message-modal-error #baes-message-title {
    color: #c00;
}

.baes-modal-close {
    position: absolute;
    top:-4px;
    right: 0px;
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--darkblue) !important;
    padding: 15px;
}
.close {
	font-size: 30px;
	cursor: pointer;
	display: inline-block;
	transform: scaleY(.8);
}

.baes-modal-section {
    margin-top: 8px;
}

.baes-modal-section label {
    display: inline-block;
    margin-bottom: 4px;
}

.baes-select-tariff {
    width: 100%;
    max-width: 100%;
}
input[disabled],
label:has(> input[disabled]) {
    color: #ccc;
}

#baes-quantity-row input[type="number"] {
    width: 80px;
}

.fc-timegrid-event .fc-event-main {
	padding: 0px;
}

.baes-event-content {
    position: relative;
    height: 100%;
    display: flex;
    flex-flow: column;
}

.baes-event-time {
	padding: 1px 3px;
	font-size: 11px;
	opacity: 0.8;
	flex: 0 1 auto;
	border-bottom: 1px #ffffff3d solid;
}

.baes-event-title {
	font-weight: 500;
	text-align: center;
	flex: 1 1 auto;
	display: flex;
	justify-content: center;
	align-items: center;
}

.baes-availability-badge {
	position: absolute;
	top: 0;
	right: 0;
	display: inline-block;
	padding: 0 3px 0 5px;
	/* border-radius: 0 0 0 6px; */
	font-size: 11px;
	/* background: rgba(0,0,0,0.5); */
	color: #fff;
}
.fc-event {
    cursor: pointer;
}

.baes-session-cancelled,
.fc-event.baes-session-cancelled {
    opacity: 0.45;
}

.fc-event.baes-session-cancelled {
    cursor: not-allowed;
}

.baes-session-cancelled td {
    opacity: 0.7;
}

.baes-loading {
    position: relative;
    padding-right: 2.2em;
    opacity: 0.9;
}

.baes-loading::after {
    content: "";
    position: absolute;
    right: 0.8em;
    top: 50%;
    width: 0.9em;
    height: 0.9em;
    margin-top: -0.45em;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-top-color: #fff;
    border-radius: 50%;
    animation: baes-spin 0.8s linear infinite;
}

@keyframes baes-spin {
    to { transform: rotate(360deg); }
}

#baes-activity-filter-wrapper {
	margin-bottom: 1em;
	text-align: center;
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 1em;
}
@media screen and (max-width: 767px) {
    #baes-activity-filter-wrapper {
        flex-direction: column;
        gap: 0.5em;
        margin-top: 1em;
    }
}

.baes-activity-filter-btn {
    display: block;
    width: 100%;
    margin-top: 1em;
}
.float-spacer {
    clear: both;
}

/* Auth modal tweaks */
.baes-auth-body .bookacti-form-field-content input[type="text"],
.baes-auth-body .bookacti-form-field-content input[type="password"],
.baes-auth-body .bookacti-form-field-content input[type="tel"] {
    width: 100%;
}

.baes-auth-body .bookacti-login-type-container {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 12px;
}

.baes-auth-body .bookacti-login-type-container + .bookacti-login-type-container:before {
    content: attr(data-separator);
    margin-right: 8px;
    opacity: 0.6;
}

.baes-auth-body .bookacti-notices {
    margin-top: 10px;
}

.disabled {
    color: #ccc;
}

#baes-user-summary-card {
    text-align: center;
	padding: 1em;
	border-radius: 2em;
	margin: 2em 0;
	/* background: var(--yellow); */
}
/* .baes-user-summary--logged-in #baes-user-summary-card {
	position: absolute;
	z-index: 1000;
	bottom: 1em;
	left: 0;
	border-radius: 1em;
	margin: auto;
	left: 1em;
	right: 1em;
	background: var(--yellow);
} */
    @media screen and (min-width: 768px) {
        .baes-user-summary--logged-in #baes-user-summary-card {
            bottom: 7em;
        }
    }
/* .baes-user-summary.baes-user-summary--logged-in #baes-user-summary-card {
    max-width: 480px;
} */

.baes-block {
	background: #fff;
	padding: 1em 1em .5em;
	border-radius: 1em;
}
.baes-block-alt {
	padding: 1em 1em .5em;
    border: 1px solid var(--darkblue);
    /* background: var(--yellow); */
	border-radius: 1em;
}

.baes-accordion-summary {
    position: relative;
    max-height: 1000px;
    transition: max-height 0.35s ease, opacity 0.25s ease;
  }

  #baes-user-next-class-summary {
    display: none;
  }
  
  .baes-summary-toggle {
    display: none;
    width: 20px;
    height: 20px;
    position: absolute;
    right: 1em;
    top: 1em;
    cursor: pointer;
    transform: translateY(-50%);
    transform: scale(2);
    margin-top: -2px;
  }
  .baes-summary-toggle::after, .baes-summary-toggle::before {
    content: "";
    display: block;
    position: absolute;
    height: 1px;
    background-color: var(--darkblue);
    width: 20px;
    top: 50%;
    transition: all 0.2s ease-in-out;
    right: 0;
  }
  .baes-summary-toggle::before {
    transform: rotate(-45deg);
    left: 0;
  }
  .baes-summary-toggle::after {
    transform: rotate(45deg);
    left: 0;
  }
  .baes-accordion-summary.is-collapsed .baes-summary-toggle::before {
    transform: rotate(45deg);
    right: -2px;
    width: 15px;
    left: auto;
  }
  .baes-accordion-summary.is-collapsed .baes-summary-toggle::after {
    width: 15px;
    transform: rotate(-45deg);
    left: -3px;
  }
  
  /* Slide/masquage du contenu */
  .baes-accordion-summary.is-collapsed {
    max-height: 50px; /* laisse visible le header + bouton */
    overflow: hidden;
  }

  .dropdown {
    position: relative;
    display: inline-block;
  }
  .filtered .close {
    display: none;
  }
  
  ul.dropdown-menu {
      list-style: none;
      margin: 0;
      padding: 0;
      background: var(--transyellow);
      color: #fff;
      position: fixed;
      width: 100%;
      height: 100%;
      top: 0;
        left: 0;
      z-index: 1000;
      display: none;
  }
  ul.dropdown-menu.open {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
    gap: 1em;
}
ul.dropdown-menu li {
	cursor: pointer;
	max-width: 300px;
	background: var(--darkblue);
	padding: .5em 1em;
	border-radius: 2em;
}

#baes-activity-filter-reset{
    display: none;
    position: absolute;
    right: -35px;
    top: 1px;
}
.filtered #baes-activity-filter-reset{
    display: block;
}

.baes-modal-body h3 {
    margin-top: 0;
}
.fc-day-past {
    background-color: #f3f3f3;
}
.fc-day-past a,
.fc-day-past a:hover {
    color: #999;
}

:where(.wp-block-group.wp-block-group-is-layout-constrained) {
    position: static;
}

@media screen and (min-width: 782px) {

    .baes-accordion-summary {
        display: grid;
        grid-gap: 2em;
        grid-template-areas: "top top"
                             "left right";
    }
    #baes-user-info-summary {
        grid-area: top;
    }
    #baes-user-next-class-summary {
        grid-area: left;
    }
    #baes-user-subscription-summary {
        grid-area: right;
    }
}

@media screen and (max-width: 782px) {

    .bookacti-user-booking-list-table td ul li span {
        display: flex !important;
        flex-direction: column;
    }
    .bookacti-user-booking-list-table td ul li span.bookacti-booking-event-title-separator {
        display: none !important;
    }
    .bookacti-user-booking-list-table td ul li span.bookacti-booking-event-date-separator {
        display: none !important;
    }
    .bookacti-user-booking-list-table td ul li span.bookacti-booking-event-end {
        display: none !important;
    }
    .bookacti-booking-quantity {
        text-align: center !important;
    }
    .bookacti-booking-quantity::after {
        content: " place(s)";
    }
    .bookacti-user-booking-list-table tr td {
        text-align: center;
    }
    .bookacti-user-booking-list-table tr td::before {
        content: "";
        float: none;
        margin: 0;
    }
}