/* ══════════════════════════════════════════════
   Albir — Newsletter / Coupon Popup
   Matches brand: black, gold (#c8a96e), white
══════════════════════════════════════════════ */

/* Overlay */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.popup-overlay.popup-visible {
  opacity: 1;
  visibility: visible;
}

/* Modal */
.popup-modal {
  position: relative;
  width: 100%;
  max-width: 520px;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  transform: translateY(28px) scale(0.97);
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.popup-overlay.popup-visible .popup-modal {
  transform: translateY(0) scale(1);
}

/* Gold top accent bar */
.popup-modal::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, #c8a96e 0%, #e8c97e 50%, #c8a96e 100%);
}

/* Close button */
.popup-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: rgba(255,255,255,0.7);
  transition: background 0.2s, color 0.2s;
  z-index: 2;
}

.popup-close:hover {
  background: rgba(255,255,255,0.18);
  color: #fff;
}

/* Content area */
.popup-body {
  padding: 40px 36px 36px;
}

/* Star icon */
.popup-icon {
  width: 52px;
  height: 52px;
  background: rgba(200,169,110,0.12);
  border: 1.5px solid rgba(200,169,110,0.35);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.popup-icon svg {
  color: #c8a96e;
}

/* Heading */
.popup-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.95rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
  margin: 0 0 10px;
}

.popup-title span {
  color: #c8a96e;
}

/* Subtitle */
.popup-subtitle {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
  margin: 0 0 24px;
  line-height: 1.6;
}

/* Coupon badge */
.popup-coupon {
  background: rgba(200,169,110,0.08);
  border: 1.5px dashed rgba(200,169,110,0.5);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.popup-coupon-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.popup-coupon-label {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.popup-coupon-code {
  font-family: 'Courier New', monospace;
  font-size: 1.35rem;
  font-weight: 700;
  color: #c8a96e;
  letter-spacing: 0.08em;
}

.popup-coupon-value {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  margin-top: 1px;
}

.popup-coupon-copy {
  background: rgba(200,169,110,0.15);
  border: 1px solid rgba(200,169,110,0.3);
  border-radius: 6px;
  padding: 7px 14px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #c8a96e;
  cursor: pointer;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background 0.2s, border-color 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.popup-coupon-copy:hover {
  background: rgba(200,169,110,0.25);
  border-color: rgba(200,169,110,0.6);
}

.popup-coupon-copy.copied {
  color: #4ade80;
  border-color: rgba(74,222,128,0.4);
  background: rgba(74,222,128,0.1);
}

/* No coupon state */
.popup-no-coupon {
  display: none; /* hidden when coupon present */
}

/* Form */
.popup-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.popup-input {
  width: 100%;
  padding: 13px 16px;
  background: rgba(255,255,255,0.07);
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color 0.2s, background 0.2s;
  box-sizing: border-box;
}

.popup-input::placeholder {
  color: rgba(255,255,255,0.35);
}

.popup-input:focus {
  outline: none;
  border-color: rgba(200,169,110,0.7);
  background: rgba(255,255,255,0.1);
}

.popup-btn {
  width: 100%;
  padding: 14px;
  background: #c8a96e;
  border: none;
  border-radius: 8px;
  color: #000;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  margin-top: 4px;
}

.popup-btn:hover {
  background: #d4b87e;
  transform: translateY(-1px);
}

.popup-btn:active {
  transform: translateY(0);
}

.popup-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Consent note */
.popup-consent {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.3);
  text-align: center;
  margin-top: 10px;
  line-height: 1.5;
}

/* Message */
.popup-msg {
  font-size: 0.82rem;
  padding: 8px 12px;
  border-radius: 6px;
  display: none;
}

.popup-msg.success {
  display: block;
  background: rgba(74,222,128,0.1);
  border: 1px solid rgba(74,222,128,0.3);
  color: #4ade80;
}

.popup-msg.error {
  display: block;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  color: #f87171;
}

/* Success state */
.popup-success-state {
  display: none;
  text-align: center;
  padding: 20px 0;
}

.popup-success-state.active {
  display: block;
}

.popup-success-icon {
  width: 56px;
  height: 56px;
  background: rgba(200,169,110,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.popup-success-state h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.6rem;
  color: #fff;
  margin: 0 0 8px;
}

.popup-success-state p {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
  margin: 0 0 20px;
}

.popup-dismiss {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  padding: 10px 24px;
  color: rgba(255,255,255,0.7);
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.popup-dismiss:hover {
  border-color: rgba(255,255,255,0.5);
  color: #fff;
}

/* Footer text */
.popup-footer-text {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.22);
  text-align: center;
  padding: 0 36px 20px;
  line-height: 1.5;
}

@media (max-width: 480px) {
  .popup-body {
    padding: 32px 24px 28px;
  }
  .popup-title {
    font-size: 1.65rem;
  }
  .popup-footer-text {
    padding: 0 24px 16px;
  }
}
