/*
 Theme Name:   Teresa's Pizza Child Theme
 Theme URI:    http://teresaspizza.com/generatepress-child/
 Description:  GeneratePress Child (For TeresaPizza.com)
 Author:       Website Psychiatrist
 Author URI:   https://websitepsychiatrist.com
 Template:     generatepress
 Version:      1.0.30
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  generatepress-child
*/

:root {
  --font-family-primary: "copse", serif;
  --font-family-secondary: "Acme", sans-serif;
}

.teresas-page-title {
  margin: 0;
  color: var(--accent);
  font-family: var(--font-family-secondary);
  font-size: clamp(2rem, 3.4vw, 3.25rem);
  line-height: 0.95;
}

.button-small {
  border: none;
  color: white !important;
  cursor: pointer;
  border-radius: 999px;
  padding: 0.5rem 0.75rem;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.8rem;
  line-height: 1.2;

  &:hover {
    color: var(--base-3);
  }
}

.button-small.accent {
  background: var(--accent);

  &:hover {
    background: var(--accent-light);
  }
}

.button-small.accent-2 {
  background: var(--accent-2);

  &:hover {
    background: var(--accent-2-light);
  }
}

.pre-header {
  position: relative;
  background: var(--accent);
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 3.5rem;
  padding: 0.5rem 1rem;
}

.pre-header-content {
  width: min(1200px, 100%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.text-content {
  font-family: var(--font-family-primary);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;

  & h6 {
    margin: 0;
  }

  @media (max-width: 768px) {
    display: none;
  }
}

.location-selector {
  background-color: var(--accent);
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: white;
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.2s ease;

  &:hover {
    background: rgba(255, 255, 255, 0.18);
  }
}

.location-selector-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  & svg {
    width: 1rem;
    height: 1rem;
  }
}

.location-selector-text {
  font-family: var(--font-family-secondary);
  font-size: 0.98rem;
}

.location-selector-caret {
  font-size: 0.8rem;
}

.location-switcher {
  position: absolute;
  right: 0;
  top: calc(100% + 0.75rem);
  z-index: 1000;
  width: min(24rem, calc(100vw - 2rem));
}

.location-switcher-panel {
  background: rgba(255, 249, 243, 0.98);
  color: #3f2b21;
  border-radius: 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow: 0 28px 60px rgba(33, 16, 10, 0.22);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.location-switcher-header {
  display: flex;
  flex-direction: column;
}

.location-switcher-eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-2);
}

.location-switcher-panel h3 {
  margin: 0;
  font-family: var(--font-family-secondary);
  color: var(--accent);
}

.location-switcher-copy,
.location-switcher-results-label,
.location-switcher-distance,
.location-switcher-error {
  margin: 0;
  color: #5d493d;
  font-size: 0.8rem;
}

.location-switcher-actions,
.location-switcher-footer {
  display: flex;
  flex-direction: row;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.location-switcher-button,
.location-switcher-link {
  border-radius: 999px;
  padding: 0.5rem 0.75rem;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.8rem;
  line-height: 1;
}

.location-switcher-button {
  border: none;
  background: var(--accent);
  color: white;
  cursor: pointer;
}

.location-switcher-link {
  background: rgba(165, 31, 21, 0.08);
  color: var(--accent);
}

.location-switcher-link-strong {
  background: rgba(54, 172, 81, 0.14);
  color: #216f35;
}

.location-switcher-results {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.location-switcher-result {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid rgba(92, 66, 53, 0.12);
  background: white;
  color: var(--accent);
  border-radius: 1rem;
  padding: 0.85rem 0.95rem;
  cursor: pointer;
  text-align: left;
}

.location-switcher-result strong,
.location-switcher-result small {
  display: block;
}

.location-switcher-result small {
  color: #6c5a51;
}

@media (max-width: 900px) {
  .pre-header {
    padding: 0.4rem 0.75rem;
    min-height: 3rem;
  }

  .pre-header-content {
    justify-content: space-between;
    gap: 0.75rem;
    align-items: center;
  }

  .location-selector {
    position: static;
    transform: none;
    margin-left: auto;
  }

  .location-switcher {
    top: calc(100% + 0.5rem);
  }
}

@media (max-width: 768px) {
  .pre-header {
    padding: 0.35rem 0.75rem;
    min-height: 0;
  }

  .pre-header-content {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
  }

  .location-selector {
    width: 100%;
    justify-content: center;
    margin-left: 0;
  }

  .location-switcher {
    position: static;
    width: 100%;
    margin-top: 0.75rem;
  }
}

.location-switcher-distance {
  font-size: 0.84rem;
  white-space: nowrap;
}

.checkmark,
.x-mark {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: block;
  justify-self: center;
  stroke-width: 2;
  stroke: white;
  stroke-miterlimit: 10;
}

.checkmark {
  box-shadow: inset 0px 0px 0px var(--accent-2);
  animation:
    checkmark-fill 0.4s ease-in-out 0.4s forwards,
    scale 0.3s ease-in-out 0.9s both;
}

.x-mark {
  box-shadow: inset 0px 0px 0px var(--accent);
  animation:
    x-mark-fill 0.4s ease-in-out 0.4s forwards,
    scale 0.3s ease-in-out 0.9s both;
}

.checkmark__circle,
.x-mark__circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 2;
  stroke-miterlimit: 10;
  fill: none;
  animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark__circle {
  stroke: var(--accent-2);
}

.x-mark__circle {
  stroke: var(--accent);
}

.checkmark__check,
.x-mark__check {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
  stroke: white;
}

.x-mark__check-1 {
  stroke-dasharray: 47;
  stroke-dashoffset: 47;
  animation: stroke-1 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.4s forwards;
}

.x-mark__check-2 {
  stroke-dasharray: 47;
  stroke-dashoffset: 47;
  animation: stroke-2 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.6s forwards;
}

@keyframes stroke {
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes stroke-1 {
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes stroke-2 {
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes scale {
  0%,
  100% {
    transform: none;
  }
  50% {
    transform: scale3d(1.1, 1.1, 1);
  }
}

@keyframes checkmark-fill {
  100% {
    box-shadow: inset 0px 0px 0px 30px var(--accent-2);
  }
}

@keyframes x-mark-fill {
  100% {
    box-shadow: inset 0px 0px 0px 30px var(--accent);
  }
}

.navigation-actions {
  display: flex;
  gap: 1rem;
}

a.location-info-action {
  width: 3rem;
  height: 3rem;

  img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
}
