/**
 * PICHY contact popup + form triggers.
 */

.pichy-popup {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.pichy-popup.is-open {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}

.pichy-popup[hidden]:not(.is-open) {
  display: none;
}

.pichy-popup.is-open[hidden] {
  display: flex;
}

.pichy-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(30, 27, 75, 0.72);
  backdrop-filter: blur(6px);
}

.pichy-popup__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 34rem);
  padding: 2rem 1.75rem 1.75rem;
  background:
    radial-gradient(ellipse 80% 60% at 100% 0%, rgba(242, 164, 116, 0.16) 0%, transparent 55%),
    linear-gradient(168deg, #3A3575 0%, #302C73 45%, #1E1B4B 100%);
  color: #FAEDE5;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.28s ease;
}

@media (min-width: 640px) {
  .pichy-popup__panel {
    padding: 2.25rem 2rem 2rem;
  }
}

.pichy-popup.is-open .pichy-popup__panel {
  transform: translateY(0) scale(1);
}

.pichy-popup__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid rgba(250, 237, 229, 0.2);
  background: transparent;
  color: #FAEDE5;
  cursor: pointer;
  transition: border-color 0.25s ease, color 0.25s ease, background-color 0.25s ease;
}

.pichy-popup__close:hover {
  border-color: rgba(242, 164, 116, 0.55);
  color: #F2A474;
  background: rgba(250, 237, 229, 0.05);
}

.pichy-popup__content {
  padding-right: 1.5rem;
}

.pichy-popup__form {
  max-width: none;
  margin: 0;
}

body.pichy-popup-open {
  overflow: hidden;
}

button.pichy-popup-trigger.type-btn {
  appearance: none;
  cursor: pointer;
  text-align: inherit;
}

button.pichy-popup-trigger.type-btn-light,
button.pichy-popup-trigger.type-btn-dark {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}
