/* ================================================================
   Love Calculator — Mobile-First & Responsive Modern Stylesheet
   Strictly compliant with Naam Hi Naam Brand Tokens & WCAG AA
   ================================================================ */

/* ── Container ── */
.bnm-lc-wrap {
  font-family: var(--font-body, 'Inter', sans-serif);
  padding: 0;
  max-width: 100%;
  box-sizing: border-box;
  color: var(--ink, #1C1B29);
}

/* ── Card ── */
.bnm-lc-card {
  background: var(--surface, #fff);
  border-radius: 24px;
  padding: 24px 20px 32px;
  box-shadow: var(--shadow-lg, 0 4px 20px rgba(0, 0, 0, .06));
  border: 1px solid var(--border, #E9E7F0);
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}

.bnm-lc-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--brand-gradient);
  background-size: 200% 100%;
  animation: bnmLcGradShift 4s linear infinite;
}

@keyframes bnmLcGradShift {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 200% 50%;
  }
}

/* ── Header ── */
.bnm-lc-card-header {
  text-align: center;
  margin-bottom: 28px;
}

.bnm-lc-icon-badge {
  width: 60px;
  height: 60px;
  background: var(--brand-gradient);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: #fff;
  margin: 0 auto 16px;
  box-shadow: 0 8px 24px rgba(var(--brand-primary-rgb, 217, 0, 107), .35);
}

.bnm-lc-title {
  font-family: var(--font-display, 'Sora', sans-serif);
  font-size: clamp(20px, 4vw, 28px);
  font-weight: 800;
  margin: 0 0 8px;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.25;
}

.bnm-lc-subtitle {
  font-size: 14px;
  color: var(--ink-soft, #6B6878);
  line-height: 1.6;
  margin: 0;
  max-width: 520px;
  margin-inline: auto;
}

/* ── Form ── */
.bnm-lc-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bnm-lc-fields-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bnm-lc-field-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bnm-lc-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink, #1C1B29);
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.bnm-lc-label .fa-user {
  color: var(--brand-secondary, #1A47E7);
}

.bnm-lc-label .fa-heart {
  color: var(--brand-primary, #D9006B);
}

.bnm-lc-input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--border, #E9E7F0);
  border-radius: 14px;
  font-size: 16px;
  font-family: inherit;
  color: var(--ink, #1C1B29);
  background: var(--canvas, #FAFAFC);
  transition: border-color .2s, box-shadow .2s, background .2s;
  -webkit-appearance: none;
  box-sizing: border-box;
}

.bnm-lc-input::placeholder {
  color: var(--ink-faint, #9A96A8);
}

.bnm-lc-input:focus {
  outline: none;
  border-color: var(--brand-primary, #D9006B);
  background: var(--surface, #fff);
  box-shadow: 0 0 0 4px rgba(var(--brand-primary-rgb, 217, 0, 107), .12);
}

.bnm-lc-error {
  font-size: 12px;
  color: #ef4444;
  font-weight: 600;
  min-height: 16px;
  display: block;
}

/* Heart divider */
.bnm-lc-heart-divider {
  display: flex;
  align-items: center;
  justify-content: center;
}

.bnm-lc-heart-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--brand-primary-soft, #FDF0F6), var(--brand-secondary-soft, #EEF2FE));
  border: 2px solid var(--brand-primary-tint, #FCE7F1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--brand-primary, #D9006B);
  flex-shrink: 0;
  animation: bnmLcPulse 2s ease-in-out infinite;
}

@keyframes bnmLcPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* ── Submit Button ── */
.bnm-lc-submit-btn {
  width: 100%;
  padding: 16px 24px;
  background: var(--brand-gradient);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 4px 20px rgba(var(--brand-primary-rgb, 217, 0, 107), .35);
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}

.bnm-lc-submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  background: var(--brand-gradient-hover);
  box-shadow: 0 8px 28px rgba(var(--brand-primary-rgb, 217, 0, 107), .45);
}

.bnm-lc-submit-btn:active:not(:disabled) {
  transform: translateY(0);
}

.bnm-lc-submit-btn:disabled {
  opacity: .65;
  cursor: not-allowed;
}

.bnm-lc-btn-loading {
  display: none;
}

.bnm-lc-submit-btn.is-loading .bnm-lc-btn-text {
  display: none;
}

.bnm-lc-submit-btn.is-loading .bnm-lc-btn-loading {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bnm-lc-submit-btn:focus-visible {
  outline: 3px solid var(--brand-primary, #D9006B);
  outline-offset: 2px;
}

/* ── Result Section ── */
.bnm-lc-result {
  margin-top: 32px;
  border-top: 1px solid var(--border, #E9E7F0);
  padding-top: 28px;
  text-align: center;
}

/* SVG Circular Chart */
.bnm-lc-score-circle {
  width: 130px;
  height: 130px;
  margin: 0 auto 16px;
  position: relative;
}

.bnm-lc-circular-chart {
  display: block;
  max-width: 100%;
  max-height: 100%;
}

.bnm-lc-circle-bg {
  stroke: var(--border, #E9E7F0);
}

.bnm-lc-circle {
  stroke: var(--brand-primary, #D9006B);
  stroke-linecap: round;
  transition: stroke-dasharray 0.8s cubic-bezier(.16, 1, .3, 1);
}

.bnm-lc-percentage {
  fill: var(--ink, #1C1B29);
  font-size: 0.52em;
  text-anchor: middle;
  font-family: inherit;
  font-weight: 800;
}

.bnm-lc-message {
  font-family: var(--font-display, 'Sora', sans-serif);
  font-size: clamp(19px, 3.5vw, 24px);
  font-weight: 800;
  color: var(--ink, #1C1B29);
  margin: 0 0 8px;
}

.bnm-lc-description {
  font-size: 14.5px;
  color: var(--ink-soft, #6B6878);
  line-height: 1.6;
  margin: 0 auto 24px;
  max-width: 560px;
}

/* Breakdown Grid */
.bnm-lc-breakdown-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 28px;
}

.bnm-lc-pill {
  background: var(--canvas, #FAFAFC);
  border: 1px solid var(--border, #E9E7F0);
  border-radius: 14px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.bnm-lc-pill-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft, #6B6878);
  text-transform: uppercase;
  letter-spacing: .02em;
}

.bnm-lc-pill-val {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--brand-primary, #D9006B);
}

/* ── Database Matched Names Container ── */
.bnm-lc-db-matches {
  margin: 28px 0;
  padding: 20px 16px;
  background: linear-gradient(180deg, var(--brand-primary-soft, #FDF0F6) 0%, var(--canvas, #FAFAFC) 100%);
  border: 1.5px solid var(--brand-primary-tint, #FCE7F1);
  border-radius: 20px;
  text-align: left;
}

.bnm-lc-db-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink, #1C1B29);
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.bnm-lc-db-title .fa-book-open-reader {
  color: var(--brand-primary, #D9006B);
}

.bnm-lc-db-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

/* Database Name Card */
.bnm-lc-name-card {
  background: var(--surface, #fff);
  border: 1.5px solid var(--border, #E9E7F0);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color .2s, box-shadow .2s;
}

.bnm-lc-name-card:hover {
  border-color: var(--brand-primary-tint, #FCE7F1);
  box-shadow: 0 4px 16px rgba(var(--brand-primary-rgb, 217, 0, 107), .1);
}

.bnm-lc-name-card--match {
  border-color: var(--brand-primary-tint, #FCE7F1);
  background: var(--surface, #ffffff);
  box-shadow: 0 2px 10px rgba(var(--brand-primary-rgb, 217, 0, 107), .06);
}

.bnm-lc-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.bnm-lc-db-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #d1fae5;
  color: #065f46;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
}

.bnm-lc-custom-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--canvas, #f1f5f9);
  color: var(--ink-soft, #64748b);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
}

.bnm-lc-name-link,
.bnm-lc-name-text {
  font-family: var(--font-display, 'Sora', sans-serif);
  font-size: 22px;
  font-weight: 800;
  color: var(--ink, #1C1B29);
  line-height: 1.1;
  margin: 2px 0;
}

.bnm-lc-name-link {
  color: var(--brand-primary, #D9006B);
  text-decoration: none;
  transition: color .2s;
}

.bnm-lc-name-link:hover {
  color: var(--brand-primary-hover, #BA005A);
  text-decoration: underline;
}

.bnm-lc-gender {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 20px;
}

.bnm-lc-gender--boy {
  background: #dbeafe;
  color: #1e40af;
}

.bnm-lc-gender--girl {
  background: var(--brand-primary-soft, #FDF0F6);
  color: var(--brand-primary, #D9006B);
}

.bnm-lc-gender--unisex {
  background: var(--brand-secondary-soft, #EEF2FE);
  color: var(--brand-secondary, #1A47E7);
}

.bnm-lc-meaning {
  font-size: 13px;
  color: var(--ink-soft, #6B6878);
  line-height: 1.5;
  margin: 0;
}

.bnm-lc-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--btn-view-details-bg, var(--brand-gradient));
  color: var(--btn-view-details-color, #fff);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 50px;
  align-self: flex-start;
  transition: transform .2s, box-shadow .2s;
  min-height: 36px;
  margin-top: 4px;
}

.bnm-lc-view-btn:hover {
  transform: translateY(-1px);
  background: var(--btn-view-details-hover-bg, var(--brand-gradient-hover));
  box-shadow: 0 4px 14px rgba(var(--brand-primary-rgb, 217, 0, 107), .4);
  color: var(--btn-view-details-hover-color, #fff);
  text-decoration: none;
}

/* Skeleton Loading */
.bnm-lc-skeleton-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.bnm-lc-skeleton-card {
  height: 110px;
  background: linear-gradient(90deg, #f1f5f9 25%, #e9eef4 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: bnmLcShimmer 1.4s ease infinite;
  border-radius: 16px;
}

@keyframes bnmLcShimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ── Result Action Buttons ── */
.bnm-lc-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
  align-items: stretch;
}

.bnm-lc-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 50px;
  font-size: 14.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  min-height: 48px;
  padding: 12px 24px;
  transition: transform .2s, background .2s, box-shadow .2s;
}

.bnm-lc-share-btn {
  background: var(--brand-gradient);
  color: #fff;
  border: none;
  box-shadow: 0 4px 16px rgba(var(--brand-primary-rgb, 217, 0, 107), .3);
}

.bnm-lc-share-btn:hover {
  transform: translateY(-1px);
  background: var(--brand-gradient-hover);
  box-shadow: 0 6px 20px rgba(var(--brand-primary-rgb, 217, 0, 107), .4);
}

.bnm-lc-reset-btn {
  background: var(--canvas, #FAFAFC);
  color: var(--ink-soft, #6B6878);
  border: 1.5px solid var(--border, #E9E7F0);
}

.bnm-lc-reset-btn:hover {
  background: var(--border, #E9E7F0);
  color: var(--ink, #1C1B29);
}

.bnm-lc-action-btn:focus-visible {
  outline: 3px solid var(--brand-primary, #D9006B);
  outline-offset: 2px;
}

/* ── How It Works Section ── */
.bnm-lc-info-section,
.bnm-lc-faq-section {
  margin-bottom: 24px;
}

.bnm-lc-section-title {
  font-family: var(--font-display, 'Sora', sans-serif);
  font-size: clamp(17px, 3.5vw, 22px);
  font-weight: 800;
  color: var(--ink, #1C1B29);
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.bnm-lc-section-title .fas {
  color: var(--brand-primary, #D9006B);
}

.bnm-lc-how-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.bnm-lc-how-card {
  background: var(--surface, #fff);
  border: 1px solid var(--border, #E9E7F0);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow, 0 1px 8px rgba(0, 0, 0, .04));
}

.bnm-lc-how-icon {
  width: 44px;
  height: 44px;
  background: var(--brand-primary-soft, #FDF0F6);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--brand-primary, #D9006B);
  margin-bottom: 12px;
}

.bnm-lc-how-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--ink, #1C1B29);
}

.bnm-lc-how-card p {
  font-size: 13.5px;
  color: var(--ink-soft, #6B6878);
  line-height: 1.6;
  margin: 0;
}

/* ── FAQ Section ── */
.bnm-lc-faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bnm-lc-faq-item {
  background: var(--surface, #fff);
  border: 1px solid var(--border, #E9E7F0);
  border-radius: 14px;
  overflow: hidden;
  transition: box-shadow .2s;
}

.bnm-lc-faq-item[open] {
  box-shadow: 0 4px 20px rgba(var(--brand-primary-rgb, 217, 0, 107), .08);
  border-color: var(--brand-primary-tint, #FCE7F1);
}

.bnm-lc-faq-q {
  padding: 16px 20px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink, #1C1B29);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: color .2s;
  min-height: 44px;
  user-select: none;
}

.bnm-lc-faq-q::-webkit-details-marker {
  display: none;
}

.bnm-lc-faq-q::after {
  content: '\f107';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 14px;
  color: var(--brand-primary, #D9006B);
  transition: transform .3s;
  flex-shrink: 0;
}

.bnm-lc-faq-item[open] .bnm-lc-faq-q {
  color: var(--brand-primary, #D9006B);
}

.bnm-lc-faq-item[open] .bnm-lc-faq-q::after {
  transform: rotate(180deg);
}

.bnm-lc-faq-a {
  padding: 0 20px 16px;
  border-top: 1px solid var(--border, #E9E7F0);
}

.bnm-lc-faq-a p {
  font-size: 13.5px;
  color: var(--ink-soft, #6B6878);
  line-height: 1.7;
  margin: 12px 0 0;
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  .bnm-lc-card::before,
  .bnm-lc-heart-icon,
  .bnm-lc-circle,
  .bnm-lc-submit-btn,
  .bnm-lc-action-btn,
  .bnm-lc-view-btn {
    transition: none;
    animation: none;
  }

  .bnm-lc-skeleton-card {
    animation: none;
    background: #e9eef4;
  }
}

/* ── Tablet Breakpoints (600px+) ── */
@media (min-width: 600px) {
  .bnm-lc-card {
    padding: 36px 32px;
  }

  .bnm-lc-fields-row {
    flex-direction: row;
    align-items: flex-start;
    gap: 16px;
  }

  .bnm-lc-heart-divider {
    margin-top: 36px;
  }

  .bnm-lc-submit-btn {
    width: auto;
    align-self: center;
    padding: 16px 36px;
  }

  .bnm-lc-breakdown-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .bnm-lc-db-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .bnm-lc-skeleton-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .bnm-lc-actions {
    flex-direction: row;
    justify-content: center;
  }

  .bnm-lc-how-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ── Desktop Breakpoints (900px+) ── */
@media (min-width: 900px) {
  .bnm-lc-card {
    padding: 40px;
  }
}