/* ============================================================
   SUUNNITTELUKONE.CSS – v3
   Tokens: navy #193652 · navy-dark #102437 · salmon #D9AE94
           cream #FCFBFA · bg #f3f6f8 · border #e5e7eb
           soft #6b7280
   ============================================================ */

* { box-sizing: border-box; }

/* ── WRAPPER ─────────────────────────────────────────────── */

.funeral-planner {
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  color: #193652;
  max-width: 640px;
  margin: 2rem auto 5rem;
  background: #fff;
  padding: 2rem;
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(0,0,0,.07);
}

@media (max-width: 600px) {
  .funeral-planner {
    padding: 20px 16px;
    margin: 1rem auto 6rem;
    border-radius: 10px;
    box-shadow: none;
    border: 1px solid #e5e7eb;
  }
}

/* ── HERO ─────────────────────────────────────────────────── */

.planner-hero {
  text-align: center;
  margin-bottom: 2rem;
}

.planner-hero h1 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(1.35rem, 4vw, 1.85rem);
  line-height: 1.3;
  color: #193652;
  margin: 0 0 .75rem;
}

.hero-lead {
  font-size: 1rem;
  color: #6b7280;
  line-height: 1.65;
  margin: 0 0 1.5rem;
}

/* ── TRUST GRID ───────────────────────────────────────────── */

.trust-grid {
  list-style: none;
  padding: 0;
  margin: 0 auto 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
  max-width: 480px;
}

.trust-grid li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: .9rem;
  color: #6b7280;
}

.trust-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: #193652;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* FIX: old CSS had visibility:hidden on all SVGs – this restores them */
.trust-icon svg,
.trust-grid svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  display: block;
  flex-shrink: 0;
  visibility: visible !important;
}

@media (max-width: 768px) {
  .trust-grid { display: none !important; }
}

/* ── CITY STEP ────────────────────────────────────────────── */

.city-step { margin-top: .5rem; }

.city-label,
.label {
  font-family: Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #193652;
  display: block;
  margin-bottom: 1rem;
  line-height: 1.35;
}

.city-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 1rem;
}

.city-btn {
  padding: .85rem .75rem;
  border-radius: 10px;
  border: 1.5px solid #e5e7eb;
  background: #f9fbfc;
  font-size: .95rem;
  font-weight: 500;
  color: #193652;
  cursor: pointer;
  text-align: center;
  transition: all .18s;
  -webkit-appearance: none;
  -webkit-text-fill-color: #193652;
}

.city-btn:hover {
  border-color: #193652;
  background: #f0f4f8;
}

.city-btn.selected {
  background: #193652;
  color: #fff;
  border-color: #193652;
  cursor: default;
  -webkit-text-fill-color: #fff;
}

.city-buttons.locked .city-btn:not(.selected) { display: none; }

.city-alt {
  font-size: .85rem;
  color: #6b7280;
  margin-bottom: .5rem;
}

@media (max-width: 600px) {
  .city-alt,
  #location { display: none; }
}

/* ── FUNERAL TYPE ─────────────────────────────────────────── */

.funeral-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: .5rem;
}

.funeral-choice {
  padding: 1rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  border: 1.5px solid #e5e7eb;
  background: #f9fbfc;
  color: #193652;
  cursor: pointer;
  border-radius: 10px;
  text-align: center;
  transition: all .18s;
}

.funeral-choice:hover  { border-color: #193652; background: #f0f4f8; }
.funeral-choice.selected { background: #193652; color: #FCFBFA; border-color: #193652; }

/* ── TRANSPORT / CHAPEL OPTION CARDS ─────────────────────── */

#options-container {
  display: grid;
  gap: 10px;
  margin-top: .75rem;
}

.funeral-option-card {
  position: relative;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px 56px 16px 16px;
  background: #f9fbfc;
  cursor: pointer;
  transition: border-color .18s, box-shadow .18s, background .18s;
  margin-bottom: 0;
}

.funeral-option-card:hover {
  border-color: #193652;
  box-shadow: 0 3px 10px rgba(25,54,82,.08);
  background: #fff;
}

/* FIX: was #e91e63 pink → now navy */
.funeral-option-card.selected {
  border-color: #193652;
  background: rgba(25,54,82,.04);
}

.funeral-option-card.selected::after {
  content: '✓';
  position: absolute;
  top: 50%; right: 16px;
  transform: translateY(-50%);
  font-size: 16px;
  color: #193652;
  font-weight: 700;
}

.option-text { font-size: .95rem; color: #333; }
.option-text strong { display: block; font-size: 1rem; margin-bottom: 3px; color: #193652; }
.option-text span   { color: #6b7280; font-size: .875rem; }

/* FIX: was #e91e63 pink → now navy */
.option-price {
  position: absolute;
  bottom: 14px; right: 16px;
  font-weight: 700;
  font-size: 1rem;
  color: #193652;
}

/* ── KUKKAKORISTELU CARDS ─────────────────────────────────── */

.arkkulaite-options {
  display: grid;
  gap: 10px;
  margin-top: 1rem;
}

/* ── PERUNKIRJOITUS – salmon highlight on the 99€ deal ──────── */

.perunkirjoitus-card[data-price="99"] {
  border-color: #D9AE94;
  background: rgba(217,174,148,.08);
}

.perunkirjoitus-card[data-price="99"]:hover {
  border-color: #c59a80;
  background: rgba(217,174,148,.14);
  box-shadow: 0 3px 10px rgba(217,174,148,.25);
}

.perunkirjoitus-card[data-price="99"].selected {
  border-color: #D9AE94;
  background: rgba(217,174,148,.18);
}

/* ── SUGGESTIONS ─────────────────────────────────────────── */

.suggestions {
  list-style: none;
  padding: 0; margin: 4px 0 0;
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  max-height: 150px;
  overflow-y: auto;
}

.suggestions li { padding: 10px 14px; cursor: pointer; font-size: .95rem; color: #193652; }
.suggestions li:hover { background: #f3f6f8; }

/* ── PRODUCT GRIDS ────────────────────────────────────────── */

.parent-product-arkut,
.parent-product-uurnat,
.parent-product-vaatteet,
.planner-products-grid {
  max-width: 100%;
  margin: 0;
}

.planner-products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 480px) {
  .planner-products-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
}

.planner-products-grid .product {
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: border-color .18s, background .18s;
}

.planner-products-grid .product:hover { border-color: #193652; }

/* FIX: was #e91e63 pink with pink shadow → now clean navy */
.planner-products-grid .product.selected,
.parent-product-arkut .product.selected {
  border: 2px solid #193652;
  background: #f0f4f8;
  box-shadow: none;
}

.planner-products-grid .product-image img {
  width: 100%; height: auto;
  border-radius: 6px; display: block;
}

.planner-products-grid .product-title {
  font-size: .9rem; font-weight: 600; color: #193652; line-height: 1.3;
}

.planner-products-grid .product-price {
  font-size: .9rem; font-weight: 600; color: #193652;
}

.select-product-btn,
.select-coffin-btn {
  margin-top: auto;
  padding: 9px 12px;
  font-size: .82rem;
  font-weight: 600;
  background: #193652;
  color: #FCFBFA;
  border: none;
  border-radius: 7px;
  width: 100%;
  cursor: pointer;
  text-align: center;
  transition: background .15s;
}

.select-product-btn:hover,
.select-coffin-btn:hover { background: #102437; }

/* ── STEP HEADINGS ────────────────────────────────────────── */

.parent-product-holder > h3.kepler {
  font-family: Georgia, serif;
  font-size: 1.2rem;
  color: #193652;
  margin: 0 0 6px;
}

.parent-product-holder > p {
  font-size: .875rem;
  color: #6b7280;
  line-height: 1.6;
  margin: 0 0 16px;
}

/* ── SUMMARY COLUMN ──────────────────────────────────────── */

.summary-column {
  background: #f3f6f8;
  color: #193652;
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 4px 16px rgba(0,0,0,.05);
  margin-top: 24px;
  margin-bottom: 8px;
}

@media (max-width: 480px) { .summary-column { padding: 16px; border-radius: 12px; } }

.summary-content { padding: 0; }

.summary-toggle {
  width: 100%;
  background: transparent;
  border: none;
  padding: 0 0 14px;
  font-size: 15px;
  font-weight: 700;
  color: #193652;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  border-bottom: 1px solid #e5e7eb;
}

.summary-otsikko { font-family: Georgia, serif; }
.summary-toggle-icon { font-size: 18px; line-height: 1; color: #6b7280; }

.summary-panel {
  overflow: hidden;
  max-height: 0; opacity: 0;
  transition: max-height .35s ease, opacity .25s ease;
}

.summary-panel.is-open { max-height: 1000px; opacity: 1; }

.summary-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid #e5e7eb;
  align-items: start;
}

.summary-item:last-of-type { border-bottom: none; }

.summary-details strong { font-size: 14px; font-weight: 600; display: block; color: #193652; }
.summary-details small  { font-size: 12px; color: #6b7280; }

.summary-item > div:last-child {
  font-size: 14px; font-weight: 600; color: #193652;
  text-align: right; white-space: nowrap;
}

.summary-item button {
  display: block;
  margin-top: 4px; margin-left: auto;
  background: transparent;
  border: 1px solid #d1d5db;
  color: #6b7280;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  cursor: pointer;
  transition: all .15s;
}

.summary-item button:hover { background: #193652; color: #fff; border-color: #193652; }

.summary-total-fixed {
  background: #fff;
  padding: 16px 20px;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0,0,0,.06);
  margin-top: 16px;
  text-align: right;
}

@media (max-width: 480px) { .summary-total-fixed { padding: 14px 16px; } }

.summary-total-label {
  font-size: 11px; letter-spacing: .1em; font-weight: 700;
  text-transform: uppercase; color: #6b7280;
}

.summary-total-price {
  font-family: Georgia, serif;
  font-size: 30px; font-weight: 800; color: #193652;
  margin-top: 4px; line-height: 1;
}

@media (max-width: 480px) { .summary-total-price { font-size: 24px; } }

.summary-total-note { font-size: 11px; color: #9ca3af; margin-top: 5px; }

/* ── NAVIGATION ──────────────────────────────────────────── */

.secondary-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  font-size: .875rem;
  font-weight: 500;
  color: #6b7280;
  background: #f3f6f8;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: all .18s;
  margin-top: 1rem;
}

.secondary-nav-btn:hover { background: #e9ecf0; border-color: #c3ccd6; color: #193652; }
.secondary-nav-btn:active { transform: translateY(1px); }

.change-city-btn { margin-top: .75rem; margin-bottom: 0; }

#back-button-wrapper { text-align: center; margin-top: 24px; }

/* ── FORM PAGE – navy background ─────────────────────────── */

#summary-form-page {
  background: #193652;
  border-radius: 12px;
  padding: 40px 32px;
  margin-top: 8px;
}

@media (max-width: 600px) {
  #summary-form-page {
    margin-left: calc(-1 * (100vw - 100%) / 2);
    margin-right: calc(-1 * (100vw - 100%) / 2);
    border-radius: 0;
    padding: 32px 20px;
  }
}

#summary-form-page .summary-layout { display: block; border-radius: 0; }

#summary-form-page .form-column {
  max-width: 560px;
  margin: 0 auto;
  background: transparent;
  padding: 0;
}

#summary-form-page h2 {
  font-family: Georgia, serif;
  color: #FCFBFA;
  text-align: center;
  margin: 0 0 10px;
  font-size: 1.5rem;
}

#summary-form-page p {
  text-align: center;
  color: rgba(252,251,250,.6);
  font-size: .9rem;
  line-height: 1.65;
  margin-bottom: 24px;
}

/* "Vainajan tiedot" sub-heading */
#summary-form-page h3 {
  font-family: Georgia, serif;
  color: rgba(252,251,250,.45);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin: 24px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

/* FIX: was white background, dark text → now transparent on navy */
#summary-form-page input[type="text"],
#summary-form-page input[type="email"],
#summary-form-page input[type="tel"],
#summary-form-page textarea {
  width: 100%;
  padding: 13px 14px;
  margin-bottom: 12px;
  border-radius: 8px;
  border: 1.5px solid rgba(255,255,255,.18);
  font-size: 15px;
  font-family: inherit;
  background: rgba(255,255,255,.1);
  color: #FCFBFA;
  outline: none;
  transition: border-color .18s, background .18s;
  -webkit-appearance: none;
}

#summary-form-page input::placeholder,
#summary-form-page textarea::placeholder { color: rgba(252,251,250,.38); }

#summary-form-page input:focus,
#summary-form-page textarea:focus {
  border-color: #D9AE94;
  background: rgba(255,255,255,.14);
  box-shadow: 0 0 0 3px rgba(217,174,148,.2);
}

#summary-form-page textarea { min-height: 90px; resize: vertical; }

.form-group { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .form-group { grid-template-columns: 1fr; } }

/* FIX: was navy on white → now salmon on navy */
#summary-form-page .submit-btn {
  width: 100%;
  background: #D9AE94;
  color: #193652;
  border: none;
  padding: 17px 20px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  display: block;
  text-align: center;
  margin-top: 8px;
  transition: background .18s, transform .1s;
  font-family: inherit;
}

#summary-form-page .submit-btn:hover { background: #c59a80; transform: translateY(-1px); }

/* FIX: was dark #333 text on white → now cream on navy */
.checkbox-holder { margin: 16px 0; padding-left: 0; }

.checkbox-agreement {
  display: grid;
  grid-template-columns: 20px 1fr;
  column-gap: 10px;
  align-items: start;
  font-size: .875rem;
  line-height: 1.5;
  color: rgba(252,251,250,.55);
}

.checkbox-agreement input[type="checkbox"] { margin-top: 2px; cursor: pointer; }
.checkbox-agreement a { color: rgba(252,251,250,.7); text-decoration: underline; }
.checkbox-agreement a:hover { color: #FCFBFA; }

/* Loader */
#form-loader { display: none; text-align: center; padding: 32px 0; }
#form-loader p { color: rgba(252,251,250,.65); margin-bottom: 16px; }

.spinner {
  margin: 0 auto;
  width: 38px; height: 38px;
  border: 3px solid rgba(255,255,255,.2);
  border-top-color: #D9AE94;
  border-radius: 50%;
  animation: sk-spin .8s linear infinite;
}

@keyframes sk-spin { to { transform: rotate(360deg); } }

/* ── THANK YOU ───────────────────────────────────────────── */

.thank-you { text-align: center; padding: 2.5rem 1rem; }

.thank-you h2 {
  font-family: Georgia, serif;
  color: #193652; font-size: 1.6rem; margin-bottom: 1rem;
}

.thank-you > p { color: #6b7280; line-height: 1.7; margin-bottom: .75rem; }

.thank-you-links { margin-top: 2.5rem; text-align: left; }

.thank-you-links h3 {
  font-family: Georgia, serif;
  margin-bottom: 1rem; color: #193652; font-size: 1.05rem;
}

/* Hide old list style */
.thank-you-links ul,
.thank-you-links li { display: none; }

.thank-you-link-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 500px) { .thank-you-link-grid { grid-template-columns: 1fr 1fr; } }

.thank-you-link {
  display: block;
  padding: 14px 16px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  background: #f9fbfc;
  text-decoration: none;
  color: #193652;
  transition: all .18s;
}

.thank-you-link:hover { background: #eef2f6; border-color: #c3ccd6; transform: translateY(-1px); }
.thank-you-link strong { display: block; font-size: .9rem; margin-bottom: 2px; }
.thank-you-link span   { font-size: .82rem; color: #6b7280; }

/* ── ALERTS ──────────────────────────────────────────────── */

#urn-required-alert,
#urn-removed-alert { display: none; padding: 10px 14px; border-radius: 8px; font-size: 14px; }

#urn-required-alert { background: #fff0f0; color: #b30000; margin-bottom: 12px; }
#urn-removed-alert  { background: #fff4e5; color: #7a4f00; margin: 10px 0; }
