/* ================================================
   BASE
================================================ */

.dmlabs-booking-wrap,
.dmlabs-booking-wrap *,
.dmlabs-booking-wrap *::before,
.dmlabs-booking-wrap *::after {
  box-sizing: border-box;
}

.dmlabs-booking-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;

  display: flex;
  justify-content: center;

  font-family: "Poppins", sans-serif;
}

.dmlabs-booking-wrap * {
  font-family: "Poppins", sans-serif;
}


.dmlabs-booking-card {

  --green: #07874d;
  --green-light: #effaf5;

  --text: #111218;
  --muted: #737b8d;

  --border: #e5e9e7;
  --icon-bg: #f5f7f6;

  width: 100%;
  max-width: 600px;
  min-width: 0;

  margin: 0 auto;
  padding: 34px;

  background: #ffffff;

  border: 1px solid var(--border);
  border-radius: 18px;

  color: var(--text);
}


/* ================================================
   HEADING
================================================ */

.booking-heading {
  width: 100%;
  min-width: 0;
}

.booking-heading h3 {
  margin: 0 0 5px;

  font-size: 25px;
  line-height: 1.2;

  font-weight: 600;
  letter-spacing: -0.03em;
}

.booking-heading p {
  margin: 0;

  color: var(--muted);

  font-size: 15px;
  line-height: 1.5;

  font-weight: 400;
}


/* ================================================
   EVENT
================================================ */

.booking-event {
  width: 100%;
  min-width: 0;

  display: flex;
  align-items: center;

  gap: 24px;

  margin-top: 26px;
  padding: 18px;

  border: 1px solid var(--border);
  border-radius: 14px;
}

.booking-date-card {
  width: 88px;
  min-width: 88px;

  overflow: hidden;

  text-align: center;

  background: #ffffff;

  border: 1px solid var(--border);
  border-radius: 12px;
}

.booking-month {
  padding: 8px 5px;

  background: var(--green-light);

  color: var(--green);

  font-size: 13px;
  line-height: 1.2;

  font-weight: 700;
}

.booking-day {
  padding-top: 8px;

  font-size: 34px;
  line-height: 1;

  font-weight: 700;
}

.booking-weekday {
  padding: 5px 5px 10px;

  color: var(--muted);

  font-size: 12px;
  font-weight: 600;
}

.booking-event-info {
  flex: 1;

  width: 100%;
  min-width: 0;
}

.booking-event-info > strong {
  display: block;

  margin-bottom: 10px;

  font-size: 16px;
  line-height: 1.4;

  font-weight: 600;

  overflow-wrap: anywhere;
}

.booking-time {
  display: flex;
  align-items: center;

  gap: 8px;

  margin-bottom: 10px;

  color: var(--muted);

  font-size: 14px;
  line-height: 1.4;

  font-weight: 400;
}

.booking-time span {
  min-width: 0;
  overflow-wrap: anywhere;
}


/* ================================================
   ICONS
================================================ */

.booking-time svg,
.calendar-trigger svg,
.booking-icon svg,
.security-icon svg {
  width: 20px;
  height: 20px;

  flex: 0 0 auto;

  fill: none;

  stroke: currentColor;
  stroke-width: 1.8;

  stroke-linecap: round;
  stroke-linejoin: round;
}


/* ================================================
   CALENDAR
================================================ */

.calendar-wrapper {
  position: relative;

  display: inline-block;

  max-width: 100%;
}

.calendar-trigger {
  display: inline-flex;
  align-items: center;

  gap: 7px;

  max-width: 100%;

  padding: 0;

  border: 0;
  background: none;

  color: var(--green);

  font-size: 14px;
  line-height: 1.4;

  font-weight: 600;

  cursor: pointer;
}

.calendar-trigger .calendar-chevron {
  width: 15px;
  height: 15px;

  transition: transform 0.25s ease;
}

.calendar-wrapper.is-open .calendar-chevron {
  transform: rotate(180deg);
}

.calendar-menu {
  display: none;

  position: absolute;

  z-index: 9999;

  top: calc(100% + 10px);
  left: 0;

  width: 235px;
  max-width: calc(100vw - 40px);

  padding: 7px;

  background: #ffffff;

  border: 1px solid var(--border);
  border-radius: 10px;

  box-shadow:
    0 12px 35px
    rgba(0, 0, 0, 0.10);
}

.calendar-menu.open {
  display: block;
}

.calendar-menu a,
.calendar-menu button {
  display: block;

  width: 100%;

  padding: 10px 11px;

  border: 0;
  border-radius: 7px;

  background: none;

  color: var(--text);

  text-align: left;
  text-decoration: none;

  font-size: 13px;
  line-height: 1.4;

  font-weight: 500;

  cursor: pointer;
}

.calendar-menu a:hover,
.calendar-menu button:hover {
  background: var(--green-light);

  color: var(--green);
}


/* ================================================
   DETAILS PANEL
================================================ */

.booking-details-panel {
  width: 100%;
  min-width: 0;
}

/* ================================================
   MOBILE DETAILS BUTTON
================================================ */

.booking-details-toggle {
  display: none;

  width: 100%;

  margin-top: 14px;
  padding: 12px 14px;

  align-items: center;
  justify-content: space-between;

  border: 1px solid var(--border);
  border-radius: 10px;

  background: #ffffff;

  color: var(--text);

  font-size: 12px;
  line-height: 1.4;

  font-weight: 500;

  cursor: pointer;
}

.booking-details-toggle svg {
  width: 17px;
  height: 17px;

  fill: none;

  stroke: var(--green);
  stroke-width: 2;

  stroke-linecap: round;
  stroke-linejoin: round;

  transition: transform 0.35s ease;
}

.booking-details-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}


/* ================================================
   DETAILS
================================================ */

.booking-details-collapse {
  width: 100%;
  min-width: 0;
}

.booking-divider {
  height: 1px;

  margin: 28px 0 8px;

  background: var(--border);
}

.booking-row {
  width: 100%;
  min-width: 0;

  display: grid;

  grid-template-columns:
    44px
    105px
    minmax(0, 1fr);

  align-items: center;

  min-height: 62px;

  border-bottom: 1px solid var(--border);
}

.booking-row:last-child {
  border-bottom: 0;
}

.booking-icon {
  width: 34px;
  height: 34px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  background: var(--icon-bg);

  color: #7b8597;
}

.booking-label {
  color: var(--muted);

  font-size: 14px;

  font-weight: 400;
}

.booking-value {
  min-width: 0;

  color: var(--text);

  font-size: 14px;
  line-height: 1.45;

  font-weight: 500;

  overflow-wrap: anywhere;
  word-break: break-word;
}


/* ================================================
   SECURITY
================================================ */

.booking-security {
  display: flex;
  align-items: flex-start;

  gap: 13px;

  width: 100%;

  margin-top: 26px;
  padding-top: 24px;

  border-top: 1px solid var(--border);
}

.security-icon {
  width: 36px;
  height: 36px;

  min-width: 36px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  background: var(--icon-bg);

  color: #7b8597;
}

.booking-security strong {
  display: block;

  font-size: 13px;
  line-height: 1.4;

  font-weight: 600;
}

.booking-security p {
  margin: 5px 0 0;

  color: var(--muted);

  font-size: 13px;
  line-height: 1.5;

  font-weight: 400;
}


/* ================================================
   LAPTOP ≤1366PX
================================================ */

@media (max-width: 1366px) {

  .dmlabs-booking-card {
    max-width: 580px;
    padding: 30px;
  }

}


/* ================================================
   TABLET ≤1024PX
================================================ */

@media (max-width: 1024px) {

  .dmlabs-booking-card {
    width: 100%;
    max-width: 720px;

    padding: 25px;
  }

  .booking-event {
    gap: 18px;

    padding: 16px;
  }

  .booking-row {
    grid-template-columns:
      40px
      88px
      minmax(0, 1fr);
  }

}


/* ================================================
   MOBILE ≤767PX
================================================ */

@media (max-width: 767px) {

  .dmlabs-booking-wrap {
    width: 100%;

    padding: 0;

    overflow: visible;
  }

  .dmlabs-booking-card {
    width: 100%;

    max-width: 100%;
    min-width: 0;

    margin: 0;

    padding: 20px;

    border-radius: 14px;

    overflow: visible;
  }


  /* HEADER */

  .booking-heading h3 {
    margin-bottom: 4px;

    font-size: 22px;
    line-height: 1.25;
  }

  .booking-heading p {
    font-size: 13px;
    line-height: 1.45;
  }


  /* EVENT */

  .booking-event {
    width: 100%;
    min-width: 0;

    margin-top: 22px;

    padding: 14px;

    gap: 14px;

    align-items: center;

    border-radius: 12px;
  }

  .booking-date-card {
    width: 72px;
    min-width: 72px;

    border-radius: 10px;
  }

  .booking-month {
    padding: 6px 4px;

    font-size: 11px;
  }

  .booking-day {
    padding-top: 7px;

    font-size: 29px;
  }

  .booking-weekday {
    padding: 4px 4px 7px;

    font-size: 10px;
  }

  .booking-event-info {
    min-width: 0;
  }

  .booking-event-info > strong {
    margin-bottom: 7px;

    font-size: 13px;
    line-height: 1.4;
  }

  .booking-time {
    align-items: flex-start;

    gap: 6px;

    margin-bottom: 7px;

    font-size: 11px;
    line-height: 1.4;
  }

  .booking-time svg {
    width: 16px;
    height: 16px;
  }


  /* CALENDAR */

  .calendar-trigger {
    gap: 5px;

    font-size: 11px;
  }

  .calendar-trigger svg {
    width: 16px;
    height: 16px;
  }

  .calendar-trigger .calendar-chevron {
    width: 12px;
    height: 12px;
  }

  .calendar-menu {
    left: auto;
    right: 0;

    width: 215px;

    max-width: calc(100vw - 45px);
  }

  .calendar-menu a,
  .calendar-menu button {
    padding: 10px;

    font-size: 11px;
  }


  /* DETAILS TOGGLE */

  .booking-details-panel {
    margin-top: 14px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
  }

  .booking-details-toggle {
    display: flex;
    margin-top: 0;
    padding: 14px 16px;
    border: 0;
    border-radius: 0;
  }

  .booking-details-toggle[aria-expanded="true"] {
    border-bottom: 1px solid var(--border);
  }


  /* SMOOTH COLLAPSE */

  .booking-details-collapse {
    display: block;

    max-height: 0;

    opacity: 0;

    visibility: hidden;

    overflow: hidden;

    transform: translateY(-7px);

    transition:
      max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1),
      opacity 0.28s ease,
      transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
      visibility 0s linear 0.45s;
  }

  .booking-details-collapse.is-open {
    max-height: 760px;

    opacity: 1;

    visibility: visible;

    transform: translateY(0);

    transition:
      max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1),
      opacity 0.3s ease 0.05s,
      transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
      visibility 0s linear 0s;
  }

  .booking-divider {
    display: none;
  }

  .booking-details-collapse {
    padding: 0 16px;
  }

  .booking-row {
    grid-template-columns:
      34px
      70px
      minmax(0, 1fr);

    min-height: 49px;
  }

  .booking-icon {
    width: 27px;
    height: 27px;
  }

  .booking-icon svg {
    width: 15px;
    height: 15px;
  }

  .booking-label {
    font-size: 10.5px;
  }

  .booking-value {
    font-size: 10.5px;
    line-height: 1.4;
  }


  /* SECURITY */

  .booking-security {
    gap: 9px;

    margin: 14px 0 16px;
    padding-top: 14px;
  }

  .security-icon {
    width: 28px;
    height: 28px;

    min-width: 28px;
  }

  .security-icon svg {
    width: 15px;
    height: 15px;
  }

  .booking-security strong {
    font-size: 10.5px;
  }

  .booking-security p {
    margin-top: 3px;

    font-size: 9.5px;
    line-height: 1.45;
  }

}


/* ================================================
   EXTRA SMALL MOBILE
================================================ */

@media (max-width: 420px) {

  .dmlabs-booking-card {
    padding: 16px;
  }

  .booking-event {
    padding: 12px;

    gap: 11px;
  }

  .booking-date-card {
    width: 64px;
    min-width: 64px;
  }

  .booking-event-info > strong {
    font-size: 12px;
  }

  .booking-time {
    font-size: 10px;
  }

  .booking-row {
    grid-template-columns:
      31px
      62px
      minmax(0, 1fr);
  }

}

@media (prefers-reduced-motion: reduce) {
  .booking-details-collapse,
  .booking-details-toggle svg {
    transition: none !important;
  }
}
