/* ==========================================================================
   DiVino newsletter / giveaway popup
   Self-contained styles (the theme's Tailwind build is pre-compiled, so this
   component does not rely on utility classes that may not exist in it).
   ========================================================================== */

.divino-popup {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s ease, visibility .35s ease;
}

.divino-popup[hidden] { display: none; }

.divino-popup.is-visible {
  opacity: 1;
  visibility: visible;
}

.divino-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .65);
  cursor: pointer;
}

.divino-popup__dialog {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 960px;
  max-height: 92vh;
  overflow: hidden;
  background: #fdf6f2;
  border-radius: 2px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .35);
  transform: translateY(24px) scale(.98);
  transition: transform .35s ease;
}

.divino-popup.is-visible .divino-popup__dialog {
  transform: translateY(0) scale(1);
}

/* Close button ----------------------------------------------------------- */
.divino-popup__close {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 2;
  width: 38px;
  height: 38px;
  padding: 6px;
  background: transparent;
  border: 0;
  color: #2c2c2c;
  cursor: pointer;
  transition: transform .2s ease, color .2s ease;
}

.divino-popup__close svg { width: 100%; height: 100%; }
.divino-popup__close:hover { color: #d4af37; transform: rotate(90deg); }

/* Image side ------------------------------------------------------------- */
.divino-popup__media {
  flex: 0 0 45%;
  min-height: 520px;
  background-size: cover;
  background-position: center;
}

/* Form side -------------------------------------------------------------- */
.divino-popup__panel {
  flex: 1 1 55%;
  padding: 56px 56px 48px;
  overflow-y: auto;
}

.divino-popup__title {
  margin: 0 0 22px;
  font-family: Cinzel, "Cormorant Garamond", serif;
  font-size: 26px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #2c2c2c;
}

.divino-popup__intro {
  margin: 0 0 30px;
  font-family: Montserrat, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: #4a4a4a;
}

.divino-popup__field { margin-bottom: 20px; }

.divino-popup__field label {
  display: block;
  margin-bottom: 8px;
  font-family: Montserrat, sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #2c2c2c;
}

.divino-popup__req {
  font-weight: 400;
  font-size: 13px;
  color: #7a7a7a;
}

.divino-popup__field input,
.divino-popup__field select {
  width: 100%;
  height: 54px;
  padding: 0 16px;
  background: #fff;
  border: 1px solid #e2dbd4;
  border-radius: 0;
  font-family: Montserrat, sans-serif;
  font-size: 13px;
  letter-spacing: .06em;
  color: #2c2c2c;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.divino-popup__field input::placeholder { color: #a3a3a3; letter-spacing: .06em; }

.divino-popup__field input:focus,
.divino-popup__field select:focus {
  border-color: #d4af37;
  box-shadow: 0 0 0 2px rgba(212, 175, 55, .18);
}

.divino-popup__field input.has-error,
.divino-popup__field select.has-error { border-color: #dc2626; }

/* Custom select arrow */
.divino-popup__select-wrap { position: relative; }

.divino-popup__select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 44px;
  color: #a3a3a3;
  cursor: pointer;
}

.divino-popup__select-wrap select.has-value { color: #2c2c2c; }

.divino-popup__caret {
  position: absolute;
  top: 50%;
  right: 16px;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  pointer-events: none;
  color: #2c2c2c;
}

/* Submit ----------------------------------------------------------------- */
.divino-popup__submit {
  display: block;
  width: 100%;
  height: 62px;
  margin-top: 26px;
  background: #d4af37;
  border: 0;
  font-family: Montserrat, sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #2c2c2c;
  cursor: pointer;
  transition: background .25s ease;
}

.divino-popup__submit:hover { background: #c19c2b; }
.divino-popup__submit:disabled { opacity: .6; cursor: not-allowed; }

/* Status message --------------------------------------------------------- */
.divino-popup__message {
  margin: 14px 0 0;
  font-family: Montserrat, sans-serif;
  font-size: 13px;
  line-height: 1.6;
  color: #1b4332;
}

.divino-popup__message:empty { display: none; }
.divino-popup__message.is-error { color: #dc2626; }

/* Fine print ------------------------------------------------------------- */
.divino-popup__legal {
  margin: 22px 0 0;
  font-family: Montserrat, sans-serif;
  font-size: 13px;
  line-height: 1.7;
  color: #4a4a4a;
}

.divino-popup__legal a {
  color: #2c2c2c;
  text-decoration: underline;
}

.divino-popup__legal a:hover { color: #d4af37; }

/* Body lock -------------------------------------------------------------- */
body.divino-popup-open { overflow: hidden; }

/* Responsive ------------------------------------------------------------- */
@media (max-width: 900px) {
  .divino-popup__dialog { flex-direction: column; max-height: 90vh; overflow-y: auto; }
  .divino-popup__media { flex: 0 0 200px; min-height: 200px; }
  .divino-popup__panel { padding: 34px 26px 32px; overflow: visible; }
  .divino-popup__title { font-size: 22px; }
  .divino-popup__close { color: #fff; }
  .divino-popup__close:hover { color: #d4af37; }
}

@media (max-width: 480px) {
  .divino-popup { padding: 12px; }
  .divino-popup__media { flex-basis: 150px; min-height: 150px; }
  .divino-popup__field input,
  .divino-popup__field select { height: 50px; }
  .divino-popup__submit { height: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  .divino-popup,
  .divino-popup__dialog,
  .divino-popup__close { transition: none; }
}
