/*

Glendale Designs Custom Programming
for townandcountry.com
Ticket: 38916167
Allowed Domains: townandcountry.com
  

GD Dialog

Copyright Glendale Designs - Our optimizations are not freeware.
Do not use, copy or distribute without written permission. 
Ask us, we're nice! support@glendaledesigns.com

TERMS OF SERVICE
https://glendaledesigns.com/terms-of-service/
(Make sure to read and understand this section 'Non-Exclusive License to Customer')
  

GDPM - v01.00.01

*/

/* Global Styles */

/* Global Styles */

:host {
  --image-height: 400px; /* Updates in JS file */
}

* {
  box-sizing: border-box;
}

img {
  max-width: 100%;
}

figure {
  margin: 0;
}

picture {
  display: inline-block;
}

a {
  color: inherit;
}

h1, h2, h3, h4, h5, h6, p {
  margin-top: 0;
}

.hide-visually {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.gd-feature-list {
  padding: 0 1rem;
}

.gd-feature-list.is-ready {
  opacity: 1 !important;
}

/* Splide */

.splide__arrow {
  background-color: white;
  border: 1px solid #ddd;
  color: #111;
  width: 45px;
  height: 45px;
  opacity: 1;
  padding: 0.65rem;

  &:hover:not(:disabled) {
    box-shadow: 0 0 38px rgba(0, 0, 0, 0.21);
    opacity: 1;
  }

  &:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }

  svg {
    fill: none;
    height: inherit;
    width: inherit;
    transform: none;
  }
}

.splide__arrows:not(:has(.splide__arrow:not([disabled]))) .splide__arrow {
  display: none;
}

/* Heading */

.gd-feature-list__heading {
  text-align: var(--heading-text-align);
  margin-bottom: 1rem;
}


/* Grid */

.gd-feature-list__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: var(--card-align, left); /* This centers the items in the last row */
  gap: 1rem;
  width: 100%;

  .gd-feature-list__card {
    flex: 0 0 calc((100% / var(--column-count, 3)) - 1rem);
    min-width: calc((100% / var(--column-count, 3)) - 1rem);
    height: auto;
    border-bottom-left-radius: 1rem;
    border-bottom-right-radius: 1rem;

    .gd-feature-list__card-text {
      padding-bottom: 1rem;
      padding-right: 1rem;
      padding-left: 1rem;
    }
  }
}

@media screen and (max-width: 480px) {
  .gd-feature-list__grid {
    .gd-feature-list__card {
      flex: 0 0 100%; /* one column */
    }
  }
}


@media screen and (min-width: 481px) and (max-width: 768px) {
  .gd-feature-list__grid {
    .gd-feature-list__card {
      flex: 0 0 calc(50% - 1rem); /* two columns */
    }
  }
}


@media screen and (min-width: 769px) and (max-width: 960px) {
  .gd-feature-list__grid {
    .gd-feature-list__card {
      flex: 0 0 calc(33.3333333333% - 1rem); /* three columns */
    }
  }
}

/* Slider */

.gd-feature-list__slider {
  &:has(figure) {
    .splide__arrow {
      top: calc(var(--image-height) / 2);
    }
  }
}

@media screen and (min-width: 100em) {
  .gd-feature-list__slider .splide__arrow--next {
    margin-right: -100px;
  }

  .gd-feature-list__slider .splide__arrow--prev {
    margin-left: -100px;
  }
}


/* Card */

.gd-feature-list__card {
  height: 100%;
  background: var(--card-background-color, transparent);

  & .gd-feature-list__card-text {
    margin-top: 1rem;
  }

  & > .gd-feature-list__card-text:first-child, & > a > .gd-feature-list__card-text:first-child {
    margin-top: 0;
  }
}


.gd-feature-list__card-link {
  text-decoration: none;
}

.gd-feature-list__card-image {
  display: flex;
  width: 100%;
}

.gd-feature-list__card-image img {
  width: 100%;
  object-fit: var(--image-fit, cover);
}

.gd-feature-list__card-text {
  text-align: var(--card-text-align, left);
}


.gd-feature-list__card-heading {
  margin-bottom: 0.35rem;
}

.gd-feature-list__card-body {
  text-decoration: none;
}

/* Closeup */

.gd-feature-list__closeup {
  border: none;
  padding: 0;
  background: none;
  margin: 0;
  height: 100%;
  width: 100%;
  max-width: 100%;
  max-height: 100%;
  padding-bottom: 1rem;

  &::backdrop {
    background-color: rgba(0, 0, 0, 0.45);
  }
}

.gd-feature-list__card-open-closeup {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: block;
  width: 100%;
}

.gd-feature-list__closeup-close {
  background-color: white;
  border: 1px solid #ddd;
  color: #111;
  width: 45px;
  height: 45px;
  opacity: 1;
  padding: 0.65rem;
  border-radius: 50%;

  &:hover {
    box-shadow: 0 0 38px rgba(0, 0, 0, 0.21);
  }
}

.gd-feature-list__closeup-inner {

}

.gd-feature-list__closeup-slider {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  position: relative;
}

.gd-feature-list__closeup-item {
}

.gd-feature-list__closeup-figure {
  height: 100%;
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.gd-feature-list__closeup-image {
  height: 100%;
}

.gd-feature-list__closeup-image img {
  overflow: hidden;
  max-width: 90vw;
  max-height: 86vh;
  object-fit: contain;
  cursor: zoom-in;
  transition: transform 0.3s ease;
  transform-origin: center center;
  will-change: transform;
}

.gd-feature-list__closeup-image img.is-zoomed {
  cursor: zoom-out;
  transform: scale(2.5);
}

.gd-feature-list__closeup .splide__arrows {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  position: absolute;
  bottom: 1rem;
  left: 0;
  right: 0;
}

.gd-feature-list__closeup .splide__arrow {
  position: static;
  transform: none;
}

.gd-feature-list__closeup-close {
  cursor: pointer;
}