/* Optional Swish module for Sun & Moon Yoga.
   The section remains hidden until SWISH_CONFIG.enabled is true in swish_v2.js. */

.swish-section {
  max-width: 820px;
  margin: 0 auto 72px;
}

.swish-card {
  padding: 42px clamp(24px, 5vw, 56px);
  background: #f6f1ea;
  border: 1px solid rgba(102, 84, 66, 0.12);
  border-radius: 18px;
  box-shadow: 0 12px 38px rgba(70, 58, 45, 0.06);
}

.swish-card h2 {
  margin: 0 0 12px;
  color: #665442;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 500;
}

.swish-card > p {
  margin: 0 0 28px;
}

.swish-field {
  display: grid;
  gap: 8px;
}

.swish-field label {
  font-weight: 600;
}

.swish-field input {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  color: #4e4a45;
  background: #fff;
  border: 1px solid rgba(102, 84, 66, 0.25);
  border-radius: 10px;
  font: inherit;
}

.swish-field input:focus {
  outline: 3px solid rgba(132, 111, 88, 0.22);
  outline-offset: 2px;
  border-color: #846f58;
}

.swish-submit,
.swish-app-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin-top: 18px;
  padding: 11px 20px;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.swish-submit {
  color: #fff;
  background: #665442;
  border: 0;
}

.swish-submit:hover {
  background: #4f4134;
}

.swish-app-link {
  color: #665442;
  background: #fff;
  border: 1px solid rgba(102, 84, 66, 0.18);
}

.swish-error {
  min-height: 1.5em;
  margin: 12px 0 0;
  color: #8b2f2f;
  font-size: 14px;
}

.swish-result {
  margin-top: 28px;
  text-align: center;
}

/* Swish-kortet. Bildens proportioner är 624 × 947. */
.swish-visual {
  position: relative;
  width: min(100%, 430px);
  margin: 0 auto;
  aspect-ratio: 624 / 947;
}

.swish-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/*
  QR-koden placeras i den vita rutan på originalbilden.
  Positionerna är procentuella så att allt skalar tillsammans.
*/
.swish-qr-overlay {
  position: absolute;
  left: 50%;
  top: 28.7%;
  width: 58%;
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);

  display: flex;
  align-items: center;
  justify-content: center;

  background: #fff;
  padding: 2.5%;
  overflow: hidden;
}

.swish-qr-overlay img,
.swish-qr-overlay canvas {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  object-fit: contain;
}

@media (max-width: 720px) {
  .swish-section {
    margin-bottom: 44px;
  }

  .swish-card {
    padding: 34px 24px;
    border-radius: 14px;
  }

  .swish-submit,
  .swish-app-link {
    width: 100%;
  }

  .swish-visual {
    width: min(100%, 360px);
  }
}
