/* ================================================================
   FLAMES CALCULATOR — calculator.css
   Clean Design: Centered Card + True Fullscreen Modal Popup
   No animations. Static, premium, responsive.
   ================================================================ */

/* ════════════════════════════════════════════════════════════════
   1. CALCULATOR CARD
   ════════════════════════════════════════════════════════════════ */
.calculator-card {
  max-width: 750px;
  margin: 0 auto;
  width: 100%;
  padding: 36px 40px;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
}

/* ── Input row layout ───────────────────────────────────────── */
.calc-inputs-row {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 20px;
}

.calc-inputs-row .calc-field-wrap {
  flex: 1;
  margin-bottom: 0;
}

/* Heart separator */
.calc-heart-separator {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff0f4;
  border: 2px solid #ffd0df;
  border-radius: 50%;
  font-size: 1.2rem;
  margin-bottom: 2px;
  user-select: none;
}

@media (max-width: 560px) {
  .calc-inputs-row {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  .calc-heart-separator {
    display: none;
  }
}

/* ── Input labels ───────────────────────────────────────────── */
.calc-field-label {
  display: block;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  color: #6b5b7b;
  margin-bottom: 7px;
  letter-spacing: 0.01em;
}

/* ── Input field wrapper ────────────────────────────────────── */
.calc-field-wrap {
  position: relative;
  margin-bottom: 14px;
}
.calc-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: #b0a0c0; pointer-events: none; display: flex; align-items: center;
}
.calc-input {
  width: 100%;
  height: 50px;
  padding: 0 14px 0 42px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: #24143d;
  background: #fafafa;
  border: 1.5px solid #e8e0f0;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  -webkit-appearance: none;
}
.calc-input::placeholder { color: #b0a0c0; }
.calc-input:focus {
  border-color: #ff2d75;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(255,45,117,0.10);
}

/* ── Error message ──────────────────────────────────────────── */
.calc-error {
  padding: 10px 14px;
  background: #fff0f4;
  border: 1px solid rgba(255,45,117,0.25);
  border-radius: 8px;
  color: #ff2d75;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.calc-error::before { content: '⚠️'; }
.calc-error[hidden] { display: none; }

/* ── Calculate button ───────────────────────────────────────── */
.calc-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 52px;
  margin-top: 4px;
  background: #ff2d75;
  color: #ffffff;
  font-family: 'Nunito', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(255,45,117,0.28);
  transition: background 0.15s, box-shadow 0.15s;
}
.calc-btn:hover { background: #e6005e; box-shadow: 0 6px 20px rgba(255,45,117,0.36); }
.calc-btn:active { background: #cc0051; }
.calc-btn:disabled { opacity: 0.65; cursor: not-allowed; }

.calc-disclaimer {
  text-align: center;
  font-size: 0.78rem;
  color: #9b8aad;
  margin-top: 12px;
}

/* ════════════════════════════════════════════════════════════════
   2. FULLSCREEN MODAL OVERLAY
   ════════════════════════════════════════════════════════════════ */
.result-popup {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

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

/* ── Modal box ──────────────────────────────────────────────── */
.result-popup-box {
  background: #ffffff;
  border-radius: 20px;
  padding: 40px 36px 32px;
  max-width: 540px;
  width: 100%;
  position: relative;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,0.18);
}

/* ── Close button ───────────────────────────────────────────── */
.close-popup-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  background: #f5f0fa;
  border: none;
  border-radius: 50%;
  font-size: 1rem;
  color: #6b5b7b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  z-index: 10;
}
.close-popup-btn:hover {
  background: #ff2d75;
  color: #ffffff;
}

/* ── Loading state ──────────────────────────────────────────── */
.result-loading { text-align: center; padding: 20px 0; }
.result-loading[hidden] { display: none; }
.spinner {
  width: 44px; height: 44px; border-radius: 50%;
  border: 3px solid rgba(255,45,117,0.2); border-top-color: #ff2d75;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
.result-loading p { color: #6b5b7b; font-size: 0.9rem; font-weight: 600; }

/* ── Result content ─────────────────────────────────────────── */
.result-content { width: 100%; }
.result-content[hidden] { display: none; }

.result-label-text {
  font-size: 0.8rem; font-weight: 700; color: #9b8aad;
  text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 6px;
}

/* Result heading (FLAMES name) */
.result-name {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1.1;
  margin-bottom: 6px;
  color: #ff2d75;
}
/* Per-result color overrides */
.result-popup[data-result="F"] .result-name { color: #22c55e; }
.result-popup[data-result="L"] .result-name { color: #ff2d75; }
.result-popup[data-result="A"] .result-name { color: #9b5cff; }
.result-popup[data-result="M"] .result-name { color: #f59e0b; }
.result-popup[data-result="E"] .result-name { color: #ff6b00; }
.result-popup[data-result="S"] .result-name { color: #3b82f6; }

.result-emoji {
  font-size: 1.8rem;
  margin-bottom: 4px;
  display: block;
}

.result-pair {
  font-size: 0.82rem; color: #9b8aad; margin-bottom: 20px; font-weight: 600;
}

/* ── Circular SVG progress ──────────────────────────────────── */
.compat-circle-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 18px;
}
.compat-circle {
  position: relative;
  width: 110px;
  height: 110px;
}
.compat-circle svg {
  width: 110px;
  height: 110px;
  transform: rotate(-90deg);
}
.compat-circle .circle-track {
  fill: none;
  stroke: #f0ecf8;
  stroke-width: 9;
}
.compat-circle .circle-progress {
  fill: none;
  stroke: #ff2d75;
  stroke-width: 9;
  stroke-linecap: round;
  stroke-dasharray: 283;
  stroke-dashoffset: 283;
  transition: stroke-dashoffset 0.5s ease;
}
.compat-circle .circle-pct {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.circle-pct-num {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  color: #24143d;
  line-height: 1;
}
.circle-pct-label {
  font-size: 0.65rem;
  color: #9b8aad;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* Per-result circle color overrides */
.result-popup[data-result="F"] .circle-progress { stroke: #22c55e; }
.result-popup[data-result="L"] .circle-progress { stroke: #ff2d75; }
.result-popup[data-result="A"] .circle-progress { stroke: #9b5cff; }
.result-popup[data-result="M"] .circle-progress { stroke: #f59e0b; }
.result-popup[data-result="E"] .circle-progress { stroke: #ff6b00; }
.result-popup[data-result="S"] .circle-progress { stroke: #3b82f6; }

.compat-circle-label {
  font-size: 0.82rem; color: #9b8aad; font-weight: 600; margin-top: 6px;
}

/* ── Alert info box ─────────────────────────────────────────── */
.result-alert-box {
  background: #fff5f8;
  border: 1px solid #ffd0df;
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 22px;
  text-align: left;
}
.result-alert-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 1px;
}
.result-alert-text {
  font-size: 0.88rem;
  color: #5a3a5c;
  line-height: 1.55;
}

/* ── Share result label ─────────────────────────────────────── */
.share-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #9b8aad;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

/* ── Share buttons grid ─────────────────────────────────────── */
.share-buttons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.share-btn-wa {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 16px; border-radius: 10px;
  background: #25d366; color: #fff;
  font-family: 'Nunito', sans-serif; font-weight: 700; font-size: 0.9rem;
  border: none; cursor: pointer; text-decoration: none;
  transition: background 0.15s;
}
.share-btn-wa:hover { background: #1ebe5a; color: #fff; }
.share-btn-fb {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 16px; border-radius: 10px;
  background: #1877f2; color: #fff;
  font-family: 'Nunito', sans-serif; font-weight: 700; font-size: 0.9rem;
  border: none; cursor: pointer; text-decoration: none;
  transition: background 0.15s;
}
.share-btn-fb:hover { background: #1565d8; color: #fff; }
.share-btn-copy {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 16px; border-radius: 10px;
  background: transparent; color: #24143d;
  font-family: 'Nunito', sans-serif; font-weight: 700; font-size: 0.9rem;
  border: 1.5px solid #e0d8f0; cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.share-btn-copy:hover { background: #f5f0fa; border-color: #9b5cff; color: #9b5cff; }
.share-btn-dl {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 16px; border-radius: 10px;
  background: transparent; color: #24143d;
  font-family: 'Nunito', sans-serif; font-weight: 700; font-size: 0.9rem;
  border: 1.5px solid #e0d8f0; cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.share-btn-dl:hover { background: #f5f0fa; border-color: #ff6b00; color: #ff6b00; }

/* ── Try Another button ─────────────────────────────────────── */
.try-another-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%;
  padding: 12px 20px; border-radius: 10px;
  background: transparent; color: #ff2d75;
  font-family: 'Nunito', sans-serif; font-weight: 700; font-size: 0.95rem;
  border: 1.5px solid #ff2d75; cursor: pointer;
  transition: background 0.15s, color 0.15s;
  margin-top: 4px;
}
.try-another-btn:hover { background: #ff2d75; color: #fff; }

/* ── Steps panel ────────────────────────────────────────────── */
.steps-toggle {
  background: none; border: none; cursor: pointer;
  font-size: 0.78rem; color: #9b8aad; font-weight: 600;
  padding: 4px 8px; border-radius: 6px; margin: 12px 0 6px;
  transition: color 0.15s;
}
.steps-toggle:hover { color: #ff2d75; }
.steps-panel { width: 100%; }
.steps-panel[hidden] { display: none; }
.steps-content {
  background: #f8f5ff; border: 1px solid #e8e0f0;
  border-radius: 10px; padding: 14px; font-family: 'Inter', monospace;
  font-size: 0.75rem; color: #6b5b7b; text-align: left;
  line-height: 1.8; white-space: pre-wrap; word-break: break-word;
}

.result-disclaimer {
  font-size: 0.72rem; color: #b0a0c0; font-style: italic;
  margin-top: 14px; line-height: 1.5;
}

/* ════════════════════════════════════════════════════════════════
   3. SPINNER KEYFRAME (kept — needed for loading state)
   ════════════════════════════════════════════════════════════════ */
@keyframes spin { to { transform: rotate(360deg); } }

/* ════════════════════════════════════════════════════════════════
   4. HOW-TO PAGE SPECIFIC
   ════════════════════════════════════════════════════════════════ */
.howto-steps-list { counter-reset: steps; list-style: none; margin: 0; padding: 0; }
.howto-step {
  counter-increment: steps;
  display: flex; gap: 20px; margin-bottom: 28px;
  padding: 24px; border-radius: 16px;
  background: rgba(255,255,255,0.7); border: 1px solid rgba(255,45,117,0.1);
}
.howto-step::before {
  content: counter(steps);
  display: flex; align-items: center; justify-content: center;
  min-width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg,#ff2d75,#9b5cff);
  color: #fff; font-family: 'Nunito',sans-serif; font-weight: 800;
  font-size: 1.1rem; flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(255,45,117,0.3);
}
.howto-step-content h3 { font-family: 'Nunito',sans-serif; font-weight: 700; margin-bottom: 6px; color: #24143d; }
.howto-step-content p  { font-size: 0.95rem; color: #6b5b7b; line-height: 1.6; margin: 0; }

.example-box {
  background: linear-gradient(135deg,rgba(255,45,117,0.05),rgba(155,92,255,0.05));
  border: 1px solid rgba(155,92,255,0.15);
  border-radius: 16px; padding: 24px; margin: 24px 0;
  font-family: 'Inter', monospace; font-size: 0.9rem;
}
.example-box h4 { font-family: 'Nunito',sans-serif; margin-bottom: 12px; color: #ff2d75; }

.hindi-heading {
  font-family: sans-serif;
  font-size: 1.5rem; font-weight: 700; color: #24143d; margin: 1.5rem 0 0.75rem;
}
.hindi-text { font-family: sans-serif; font-size: 1rem; line-height: 1.8; color: #3d2c55; }

/* ════════════════════════════════════════════════════════════════
   5. RESPONSIVE CALCULATOR
   ════════════════════════════════════════════════════════════════ */
@media (max-width: 992px) {
  .calculator-card { max-width: 600px; }
}
@media (max-width: 600px) {
  .calculator-card { padding: 24px 20px; }
  .result-popup-box { padding: 28px 20px 24px; }
  .share-buttons-grid { grid-template-columns: 1fr; }
  .calc-input { height: 46px; font-size: 0.92rem; }
  .calc-btn   { height: 48px; font-size: 1rem; }
  .result-name { font-size: 2.2rem; }
}
