/*=========================================================================
# General Guidelines
===========================================================================
1. Follow the BEM (Block Element Modifier) naming convention.
2. Maintain a modular approach for styles.
3. Test styles across all major browsers (Chrome, Firefox, Safari, Edge).
4. Ensure proper accessibility (e.g., WCAG compliance).
===========================================================================*/

/* Local variables
===========================================================================*/
:root {
  --wep-direction-btn-bg: #ffffff;
  --wep-direction-btn-color: #808080;
  --wep-direction-table-bg: #fafafa;
  --wep-direction-table-color: rgba(0, 0, 0, 0.56);
  --wep-modal-width: 420px;
  --wep-modal-bg: #ffffff;
  --wep-modal-color: #808080;
  --wep-modal-overlay-bg: rgba(0, 0, 0, 0.6);
  --wep-modal-border-radius: 6px;
  --wep-modal-box-shadow: 0 4px 7px rgba(0, 0, 0, 0.15);
}

/* Layout Style
===========================================================================*/
.wep-root {
  position: relative;
}

.wep-content-area {
  position: absolute;
  bottom: 28px;
  right: 20px;
  z-index: 1;
}

/* Map Styles
===========================================================================*/
.wep-map-wrapper {
  position: relative;
  overflow: hidden;
}
.wep-map-wrapper .wpgmp_map_parent {
  margin-bottom: 0;
}

/* Dropdown menu
===========================================================================*/
.wep-dropdown-menu {
  inset: auto 0 0 auto;
  margin: 0;
  transform: translate(0px, -50px);
  --wep-dropdown-padding-y: 20px;
  --wep-dropdown-padding-x: 15px;
  --wep-dropdown-box-shadow: 0 4px 7px rgba(0, 0, 0, 0.15);
}

.wep-dropdown-header .title {
  line-height: 1;
  margin-left: 0;
}

/* Form
===========================================================================*/
.wep-form-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
}

.wep-form-container .wep-form-control {
  --wep-form-control-padding-y: 8px;
  --wep-form-control-padding-x: 16px;
  --wep-form-control-height: 40px;
}

.wep-form-container .wep-form-select {
  --wep-form-select-padding-y: 8px;
  --wep-form-select-padding-x: 16px;
  --wep-form-select-height: 40px;
}

.wep-form-container .wep-btn {
  --wep-btn-padding-y: 11px;
  --wep-btn-padding-x: 16px;
  --wep-btn-font-size: 0.87em;
}

.wep-form-container .wep-btn-default {
  --wep-btn-color: var(--wep-white);
  --wep-btn-bg: var(--wep-black);
  --wep-btn-border-color: transparent;
  --wep-btn-hover-color: var(--wep-white);
  --wep-btn-hover-bg: #282828;
  --wep-btn-hover-border-color: transparent;
  width: 100%;
}

.wep-form-container .wpgmp-autocomplete-wrapper {
  margin-bottom: 0;
}

/* Start location */
.wep-start-location {
  position: relative;
}

.wep-start-location .wep-form-control {
  padding-right: calc(var(--wep-form-control-padding-x) + 20px);
}

.wep-start-location .wep-btn-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 10px;
  z-index: 2;
}

/* Select box */
.wep-select-box-wrapper {
  display: flex;
  gap: 15px;
}

.wep-btn-wrapper .wep-btn + .wep-btn {
  margin-top: 10px;
}

/* Directions table
===========================================================================*/
.wep-directions-wrapper {
  font-size: 11px;
  background-color: var(--wep-direction-table-bg);
}

.wep-directions-wrapper :is(table, td, th) {
  border: 0 none;
}

.wep-directions-wrapper table:not(.adp-placemark) {
  margin: 0;
}

.wep-directions-wrapper .adp-placemark {
  background-color: transparent;
  color: var(--wep-black);
  font-size: 14px;
  line-height: 18px;
}

.wep-directions-wrapper .adp-agencies {
  padding-inline: 15px;
}

.wep-directions-wrapper .adp-legal {
  padding: 0 15px 15px;
}

.adp,
.adp table,
.adp button {
  font-family: var(--wep-body-font-family);
  font-weight: var(--wep-body-font-weight);
  color: var(--wep-direction-table-color);
  box-shadow: none;
}

.adp-step,
.adp-substep {
  padding: 5px 8px;
}

.adp-summary {
  font-size: 12px;
  padding: 5px 10px;
  color: var(--wep-black);
}

.adp b,
.adp-list b {
  font-weight: 700;
}

.adp-placemark .adp-marker2 {
  min-width: 22px;
  margin-left: 15px;
}

.adp-details,
.adp-legal {
  color: var(--wep-direction-table-color);
}

/* Direction button style
===========================================================================*/
.wep-direction-btn {
  --wep-btn-box-shadow: 0 4px 7px rgba(0, 0, 0, 0.15);
  background-color: var(--wep-direction-btn-bg);
  color: var(--wep-direction-btn-color);
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 150px;
  border-radius: var(--wep-btn-border-radius);
  box-shadow: var(--wep-btn-box-shadow);
  text-align: center;
  cursor: pointer;
}

.wep-direction-btn .wep-icon-arrow-up {
  transition: transform 0.2s ease;
}

.wep-direction-btn[aria-expanded="true"] .wep-icon-arrow-up {
  transform: rotate(180deg);
}

/* Modal style
===========================================================================*/
.wep-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 100;
  width: 100%;
  height: 100%;
  background-color: var(--wep-modal-overlay-bg);
  display: none; /* Hidden by default */
  justify-content: center;
  align-items: center;
  -webkit-animation: fade-in 0.5s cubic-bezier(0.4, 0, 0.2, 1) 1;
  animation: fade-in 0.5s cubic-bezier(0.4, 0, 0.2, 1) 1;
}

.wep-modal {
  background-color: var(--wep-modal-bg);
  color: var(--wep-modal-color);
  border-radius: var(--wep-modal-border-radius);
  box-shadow: var(--wep-modal-box-shadow);
  max-width: var(--wep-modal-width);
  margin-inline: 10px;
  -webkit-animation: zoom-in 0.5s cubic-bezier(0.4, 0, 0.2, 1) 1;
  animation: zoom-in 0.5s cubic-bezier(0.4, 0, 0.2, 1) 1;
}

.wep-modal-header {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  border-bottom: 1px solid var(--wep-border-color);
}

.wep-modal-header .wep-btn {
  margin-left: auto;
}

.wep-modal-body {
  padding: 20px;
  max-height: 300px;
  overflow-y: auto;
}

/* Blur effect for the background */
.blurred {
  filter: blur(10px);
  transition: filter 0.3s ease;
}

/* Keyframe
===========================================================================*/
@-webkit-keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@-webkit-keyframes zoom-in {
  from {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
  }
}

@keyframes zoom-in {
  from {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
  }
}
