/* ==========================================================================
   Hostellerie am Schwarzsee - Master Stylesheet (Minimal Pure Cashback)
   Solid Navy Header (Centered Logo), Clean White Background, Sharp Corners (NO PILLS)
   Fonts: Quiche Sans Medium, Basier Square
   Colors: Deep Navy (#002E4B), Coral Red (#E54C58), Warm Cream (#EDEAE4),
           White (#FFFFFF), Light Paper (#F6F5F2), Stone Beige (#D6D0C4)
   ========================================================================== */

/* --- Font Definitions --- */
@font-face {
  font-family: 'QuicheSansMedium';
  src: url('assets/fonts/QuicheSansMedium.woff2') format('woff2');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Basier Square Regular';
  src: url('assets/fonts/basiersquare-regular-webfont.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Basier Square Regular Italic';
  src: url('assets/fonts/basiersquare-regularitalic-webfont.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Basier Square Semibold';
  src: url('assets/fonts/basiersquare-semibold-webfont.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Basier Square Semibold Italic';
  src: url('assets/fonts/basiersquare-semibolditalic-webfont.woff2') format('woff2');
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}

/* --- CSS Variables --- */
:root {
  --primary-blue: #002E4B;
  --primary-blue-dark: #001f33;
  --brand-red: #E54C58;
  --brand-red-hover: #d23d49;
  --bg-warm: #EDEAE4;
  --bg-light: #F6F5F2;
  --bg-white: #FFFFFF;
  --border-warm: #D6D0C4;
  --border-light: #e4dfd7;
  --text-muted: #7f8e99;
  --text-dark: #002E4B;
  --header-height: 94px;
  --desk-max-width: 1200px;
  --desk-padding: 30px;
  --transition: all 0.25s cubic-bezier(0.2, 0, 0, 1);
}

/* --- Reset & Global --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-radius: 0 !important; /* Strict Swiss geometric design: NO PILLS */
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Basier Square Regular', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--primary-blue);
  background-color: var(--bg-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: none;
  background: none;
  font: inherit;
  cursor: pointer;
}

.desk-container {
  width: 100%;
  max-width: var(--desk-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--desk-padding);
  padding-right: var(--desk-padding);
}

/* Typography */
h1, h2, h3 {
  font-family: 'QuicheSansMedium', Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.015em;
  color: var(--primary-blue);
}

main {
  flex: 1;
}

/* ==========================================================================
   HEADER (Solid Navy Blue, Center Logo, No Burger, No Top Lang)
   ========================================================================== */
.section--header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  background-color: var(--primary-blue);
  box-shadow: 0 4px 20px rgba(0, 46, 75, 0.15);
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.header-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--desk-padding);
}

.header-left {
  flex: 1;
  display: flex;
  align-items: center;
}

.header-brand-title {
  font-family: 'Basier Square Semibold', sans-serif;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.7);
}

.header-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-logo {
  display: block;
  height: 58px;
}

.header-logo img {
  height: 58px;
  width: auto;
}

.header-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.btn-header-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  background: var(--brand-red);
  color: #FFFFFF;
  font-family: 'Basier Square Semibold', sans-serif;
  font-size: 14px;
  letter-spacing: 0.02em;
  border: 1.5px solid var(--brand-red);
  cursor: pointer;
}

.btn-header-action:hover {
  background: #FFFFFF;
  color: var(--primary-blue);
  border-color: #FFFFFF;
}

/* ==========================================================================
   PURE GUEST CASHBACK SECTION (No booking IDs, No total sums, Pure & Sharp)
   ========================================================================== */
.guest-pure-section {
  background-color: var(--bg-white);
  padding: 60px 0 50px;
}

.guest-pure-wrapper {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

/* 1. Greeting */
.guest-greeting-h1 {
  font-size: clamp(2.4rem, 4.4vw, 3.6rem);
  line-height: 1.15;
  color: var(--primary-blue);
  margin-bottom: 18px;
}

/* 2. Exact Cashback Information */
.guest-info-lead {
  font-size: clamp(1.15rem, 1.6vw, 1.35rem);
  line-height: 1.65;
  color: #3b5161;
  margin-bottom: 40px;
}

.guest-info-lead strong {
  color: var(--primary-blue);
  font-family: 'Basier Square Semibold', sans-serif;
}

/* Distinctive Cash Display Card */
.cashback-focus-card {
  background: #FFFFFF;
  border: 2px solid var(--primary-blue);
  box-shadow: 0 12px 35px rgba(0, 46, 75, 0.08);
  padding: 44px 40px;
  text-align: center;
  margin-bottom: 30px;
}

.focus-card-top-label {
  font-family: 'Basier Square Semibold', sans-serif;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.focus-amount {
  font-family: 'QuicheSansMedium', serif;
  font-size: clamp(3.8rem, 6vw, 5.2rem);
  line-height: 1;
  color: var(--primary-blue);
  margin-bottom: 10px;
}

.focus-rate-badge {
  display: inline-block;
  padding: 5px 14px;
  background: var(--bg-light);
  border: 1px solid var(--border-warm);
  color: var(--brand-red);
  font-family: 'Basier Square Semibold', sans-serif;
  font-size: 14px;
  margin-bottom: 32px;
}

/* TWINT Button Action Box */
.twint-action-box {
  border-top: 1px solid var(--border-light);
  padding-top: 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.btn-twint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  max-width: 480px;
  padding: 18px 24px;
  background-color: #000000;
  color: #FFFFFF;
  font-family: 'Basier Square Semibold', sans-serif;
  font-size: 16px;
  letter-spacing: 0.02em;
  border: 2px solid #000000;
  cursor: pointer;
  white-space: nowrap;
  box-sizing: border-box;
}

.btn-twint span {
  white-space: nowrap;
}

.btn-twint:active {
  opacity: 0.85;
}

.btn-twint img {
  height: 30px;
  width: auto;
  flex-shrink: 0;
}

.btn-twint-arrow {
  width: 17px;
  height: 17px;
  stroke: #FFFFFF;
  flex-shrink: 0;
  transition: transform 0.2s ease;
  margin-left: 2px;
}

.btn-twint:hover .btn-twint-arrow {
  transform: translateX(3px);
}

.twint-sub-note {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
  text-align: center;
  width: 100%;
}

.sub-note-check-svg {
  display: inline-block;
  vertical-align: -1.5px;
  margin-right: 5px;
  stroke: var(--primary-blue);
}

/* ==========================================================================
   FOOTER (Preserved 4 Columns)
   ========================================================================== */
.section--footer {
  background-color: var(--bg-warm);
  padding: 24px 0 30px;
  border-top: 1px solid rgba(0, 46, 75, 0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: 32% 24% 20% 24%;
  gap: 48px;
  margin-bottom: 50px;
}

.footer-col-brand img {
  height: 46px;
  width: auto;
  margin-bottom: 18px;
}

.footer-brand-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--primary-blue);
  opacity: 0.85;
}

.footer-heading {
  font-family: 'Basier Square Semibold', sans-serif;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary-blue);
  margin-bottom: 20px;
}

.footer-col address {
  font-style: normal;
  font-size: 14px;
  line-height: 1.7;
  color: var(--primary-blue);
  margin-bottom: 14px;
}

.footer-phone {
  display: inline-block;
  font-family: 'Basier Square Semibold', sans-serif;
  font-size: 15px;
  color: var(--primary-blue);
  margin-bottom: 6px;
}

.footer-phone:hover {
  color: var(--brand-red);
}

.footer-email {
  font-size: 14px;
  color: var(--primary-blue);
  text-decoration: underline;
}

.footer-email:hover {
  color: var(--brand-red);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  font-size: 14px;
  color: var(--primary-blue);
}

.footer-links a:hover {
  color: var(--brand-red);
}

.footer-social-list {
  display: flex;
  gap: 14px;
  margin-bottom: 24px;
}

.footer-social-btn {
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--primary-blue);
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-social-btn:hover {
  background: var(--brand-red);
  border-color: var(--brand-red);
}

.footer-social-btn img {
  width: 16px;
  height: 16px;
}

.tripadvisor-badge img {
  height: 38px;
  width: auto;
}

.footer-bottom {
  border-top: 1px solid rgba(0, 46, 75, 0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-legal-links {
  display: flex;
  gap: 20px;
}

.footer-legal-links a:hover {
  color: var(--primary-blue);
}

/* Toast */
.toast-notice {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--primary-blue);
  color: #FFFFFF;
  padding: 16px 28px;
  font-family: 'Basier Square Semibold', sans-serif;
  font-size: 14px;
  box-shadow: 0 10px 30px rgba(0, 46, 75, 0.3);
  z-index: 3000;
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.toast-notice.show {
  transform: translateY(0);
  opacity: 1;
}

/* Responsive */
@media (max-width: 900px) {
  .header-left {
    display: none;
  }
  .cashback-focus-card {
    padding: 30px 20px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }
}

@media (max-width: 600px) {
  :root {
    --header-height: 74px;
    --desk-padding: 12px;
  }
  .header-logo {
    height: 44px;
  }
  .header-logo img {
    height: 44px;
  }
  .guest-greeting-h1 {
    font-size: 2.1rem;
  }
  .guest-info-lead {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 24px;
  }
  .cashback-focus-card {
    padding: 24px 10px;
    margin-bottom: 24px;
  }
  .focus-amount {
    font-size: 3.2rem;
  }
  .btn-twint {
    padding: 15px 12px;
    font-size: clamp(12.5px, 3.6vw, 14.5px);
    gap: 8px;
    white-space: nowrap !important;
  }
  .btn-twint img {
    height: clamp(20px, 5.2vw, 24px);
    flex-shrink: 0;
  }
  .btn-twint span {
    white-space: nowrap !important;
  }
  .btn-twint-arrow {
    width: clamp(13px, 3.5vw, 15px);
    height: clamp(13px, 3.5vw, 15px);
  }
  .twint-sub-note {
    font-size: 11.5px;
    margin-top: 12px;
    line-height: 1.4;
    white-space: normal;
  }
  .payout-method-selector {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}


/* ==========================================================================
   3-Step Payout Instructions Below Card
   ========================================================================== */
.steps-instruction-section {
  margin-top: 50px;
  padding-top: 40px;
  border-top: 1px solid var(--border-light);
  text-align: center;
}

.steps-instruction-title {
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  margin-bottom: 30px;
  color: var(--primary-blue);
}

.steps-instruction-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: left;
}

.instruction-step-card {
  background: var(--bg-light);
  border: 1px solid var(--border-warm);
  border-top: 3px solid var(--primary-blue);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
}

.instruction-step-num {
  font-family: 'QuicheSansMedium', serif;
  font-size: 2.2rem;
  line-height: 1;
  color: var(--brand-red);
  margin-bottom: 12px;
}

.instruction-step-body {
  flex: 1;
}

.instruction-step-title {
  font-family: 'Basier Square Semibold', sans-serif;
  font-size: 15px;
  color: var(--primary-blue);
  margin-bottom: 8px;
}

.instruction-step-desc {
  font-size: 13.5px;
  color: #556775;
  line-height: 1.55;
  text-wrap: pretty;
  hyphens: none;
  -webkit-hyphens: none;
}

@media (max-width: 768px) {
  .steps-instruction-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .instruction-step-card {
    flex-direction: row;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 16px;
    border-top: 1px solid var(--border-warm);
    border-left: 3px solid var(--primary-blue);
    min-height: 104px;
    box-sizing: border-box;
  }
  .instruction-step-num {
    font-size: 1.9rem;
    margin-bottom: 0;
    min-width: 38px;
    flex-shrink: 0;
  }
  .instruction-step-body {
    flex: 1;
    min-width: 0;
  }
  .instruction-step-title {
    font-size: 14.5px;
    margin-bottom: 4px;
  }
  .instruction-step-desc {
    font-size: 13px;
    line-height: 1.45;
  }
}

/* ==========================================================================
   Loading Modal (TWINT Processing)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 30, 50, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background: #FFFFFF;
  border: 2px solid var(--primary-blue);
  box-shadow: 0 16px 40px rgba(0, 46, 75, 0.25);
  width: 100%;
  max-width: 400px;
  padding: 36px 28px 28px;
  text-align: center;
}

.modal-twint-header {
  margin-bottom: 22px;
}

.modal-twint-logo {
  height: 36px;
  width: auto;
  margin: 0 auto;
}

.modal-spinner-wrapper {
  margin: 0 auto 22px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-spinner-svg {
  width: 50px;
  height: 50px;
  display: block;
  animation: rotateSvgSpinner 1.2s linear infinite;
}

.spinner-track {
  stroke: rgba(0, 46, 75, 0.12);
}

.spinner-circle {
  stroke: var(--primary-blue);
  stroke-dasharray: 95, 150;
  stroke-dashoffset: 0;
  stroke-linecap: square;
  animation: dashSvgSpinner 1.4s ease-in-out infinite;
}

@keyframes rotateSvgSpinner {
  100% {
    transform: rotate(360deg);
  }
}

@keyframes dashSvgSpinner {
  0% {
    stroke-dasharray: 1, 150;
    stroke-dashoffset: 0;
  }
  50% {
    stroke-dasharray: 95, 150;
    stroke-dashoffset: -35;
  }
  100% {
    stroke-dasharray: 95, 150;
    stroke-dashoffset: -125;
  }
}

.modal-title {
  font-family: 'Basier Square Semibold', sans-serif;
  font-size: 18px;
  color: var(--primary-blue);
  margin-bottom: 10px;
}

.modal-text {
  font-size: 14px;
  line-height: 1.55;
  color: #556775;
  margin-bottom: 20px;
}

.modal-text strong {
  color: var(--primary-blue);
  font-family: 'Basier Square Semibold', sans-serif;
}

/* Dynamic Single Step Box (Items replace each other sequentially) */
.modal-status-box {
  background: var(--bg-light);
  border: 1px solid var(--border-warm);
  padding: 16px 16px 14px;
  margin: 18px 0;
  text-align: left;
}

.status-step-row {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 12px;
  min-height: 24px;
}

.status-step-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.status-step-text {
  font-family: 'Basier Square Semibold', sans-serif;
  font-size: 13.5px;
  color: var(--primary-blue);
  line-height: 1.4;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.status-step-text.fade-out {
  opacity: 0;
  transform: translateY(-3px);
}

.svg-step-spinning {
  animation: rotateSvgSpinner 0.8s linear infinite;
  transform-origin: center;
  display: block;
}

/* Connection Progress Bar */
.conn-progress-track {
  width: 100%;
  height: 4px;
  background: var(--border-light);
  overflow: hidden;
}

.conn-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--primary-blue);
  transition: width 0.4s ease;
}

/* Animated Success Checkmark in Modal */
.modal-success-svg {
  width: 50px;
  height: 50px;
  display: block;
}

.success-circle {
  stroke-dasharray: 160;
  stroke-dashoffset: 160;
  animation: drawSuccessCircle 0.5s ease-out forwards;
}

.success-check {
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
  animation: drawSuccessCheck 0.4s 0.22s ease-out forwards;
}

@keyframes drawSuccessCircle {
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes drawSuccessCheck {
  100% {
    stroke-dashoffset: 0;
  }
}

/* Redirect Notice Box (Replacing sequential steps in final state) */
.redirect-notice-box {
  background: var(--bg-light);
  border: 1px solid var(--border-warm);
  border-left: 3px solid #168039;
  padding: 18px 16px;
  margin: 18px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  animation: fadeInRedirect 0.35s ease forwards;
}

@keyframes fadeInRedirect {
  0% {
    opacity: 0;
    transform: translateY(4px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.redirect-notice-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.redirect-notice-text {
  font-family: 'Basier Square Semibold', sans-serif;
  font-size: 13.5px;
  color: var(--primary-blue);
  line-height: 1.45;
  margin: 0;
  text-align: left;
}

@media (max-width: 480px) {
  .modal-dialog {
    padding: 26px 16px 20px;
  }
  .modal-title {
    font-size: 16.5px;
  }
  .modal-text {
    font-size: 13px;
  }
  .status-step-text {
    font-size: 12.5px;
  }
  .redirect-notice-text {
    font-size: 12.5px;
  }
}

.modal-footer-note {
  border-top: 1px solid var(--border-light);
  padding-top: 16px;
  font-size: 12px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.modal-lock-svg {
  flex-shrink: 0;
  stroke: #788896;
}
