/* ================= MAIN POPUP ================= */
.quote-popup,
.success-popup {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);

  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;

  z-index: 9999;

  /* 🔥 smooth rendering */
  will-change: opacity;
}

.quote-popup.active,
.success-popup.active {
  opacity: 1;
  visibility: visible;
}

/* ================= BOX ================= */
.quote-box,
.success-box {
  width: 90%;
  max-width: 420px;
  padding: 30px 25px;

  background: #FFF8F0;
  border-radius: 20px;

  box-shadow: 0 25px 60px rgba(0,0,0,0.25);
  position: relative;

  animation: fadeIn 0.3s ease;

  /* 🔥 better animation */
  transform: translateZ(0);
}

/* ANIMATION */
@keyframes fadeIn {
  from { transform: translateY(25px) scale(0.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

/* ================= CLOSE ================= */
.close-btn {
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 30px;
  cursor: pointer;
  line-height: 1;
}

.close-btn h2 {
  font-size: 40px;
}

/* ================= TEXT ================= */
.sub-text {
  font-size: 13px;
  color: #666;
  margin-bottom: 20px;
}

/* ================= INPUT GROUP ================= */
.input-group {
  position: relative;
  margin-bottom: 18px;
}

/* INPUT */
.input-group input,
.input-group textarea {
  width: 100%;
  padding: 14px 12px;
  border-radius: 12px;
  border: 1px solid #ddd;

  background: #f9f9f9;
  outline: none;
  transition: all 0.25s ease;

  font-size: 14px;
}

/* TEXTAREA */
.input-group textarea {
  height: 90px;
  resize: none;
}

/* FOCUS */
.input-group input:focus,
.input-group textarea:focus {
  border-color: #a77b55;
  background: #FFF8F0;
  box-shadow: 0 0 0 3px rgba(167,123,85,0.12);
}

/* ================= FLOAT LABEL ================= */
.input-group label {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);

  background: #fff; /* 🔥 FIX (was white mismatch) */
  padding: 0 6px;

  font-size: 13px;
  color: #777;

  pointer-events: none;
  transition: all 0.25s ease;
}

.input-group input:focus + label,
.input-group input:valid + label,
.input-group textarea:focus + label,
.input-group textarea:valid + label {
  top: -8px;
  font-size: 11px;
  color: #a77b55;
}

/* ================= BUTTON ================= */
.submit-btn,
.success-box button {
  width: 100%;
  padding: 14px;

  background: #a77b55;
  color: #fff;

  border: none;
  border-radius: 12px;
  cursor: pointer;

  transition: all 0.25s ease;
}

.submit-btn:hover {
  background: #8c6545;
  transform: translateY(-1px);
}

/* ================= SUCCESS ================= */
.success-box {
  text-align: center;
}

.success-box h3 {
  margin-bottom: 10px;
}

/* ================= SUCCESS ANIMATION ================= */
.checkmark {
  width: 70px;
  height: 70px;
  margin: 0 auto 15px;
}

/* SVG FIX */
.checkmark svg {
  width: 100%;
  height: 100%;
}

/* CIRCLE */
.checkmark circle {
  stroke: #a77b55;
  stroke-width: 3;
  fill: none;

  stroke-dasharray: 157;
  stroke-dashoffset: 157;

  animation: circle 0.6s ease forwards;
}

/* TICK */
.checkmark path {
  stroke: #a77b55;
  stroke-width: 3;
  fill: none;

  stroke-linecap: round;
  stroke-linejoin: round;

  stroke-dasharray: 36;
  stroke-dashoffset: 36;

  animation: tick 0.4s ease forwards;
  animation-delay: 0.6s;
}

/* KEYFRAMES */
@keyframes circle {
  to { stroke-dashoffset: 0; }
}

@keyframes tick {
  to { stroke-dashoffset: 0; }
}

/* ================= MOBILE ================= */
@media (max-width: 600px) {
  .quote-box,
  .success-box {
    padding: 25px 20px;
  }
}

/* ================= iPHONE FIX ================= */
@supports (-webkit-touch-callout: none) {
  .quote-popup,
  .success-popup {
    padding-bottom: env(safe-area-inset-bottom);
  }
}