@font-face {
  font-family: "AvenirNextCyr";
  src: url("./fonts/AvenirNextCyr-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "AvenirNextCyr";
  src: url("./fonts/AvenirNextCyr-Demi.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-bg: #ffffff;
  --color-panel: #f7faf7;
  --color-card: #ffffff;
  --color-text: #5f6a72;
  --color-text-dark: #202020;
  --color-note: #485057;
  --color-accent: #4caf50;
  --color-accent-dark: #2f8d3c;
  --color-accent-soft: rgba(76, 175, 80, 0.1);
  --color-border: #dbe3ef;
  --color-result-bg: #fbfbfb;
  --color-alert: #d84343;
  --color-intro: #7c0d01;
  --shadow-soft: 0 18px 48px rgba(53, 74, 89, 0.08);
  --shadow-card: 0 8px 22px rgba(53, 74, 89, 0.05);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: transparent;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  color: var(--color-text);
}

button,
input {
  font: inherit;
}

.widget-page {
  width: 100%;
}

.widget-shell {
  width: 100%;
  max-width: none;
  margin: 0;
}

.widget-card,
.thanks-card {
  position: relative;
  background: var(--color-bg);
}

.widget-card {
  overflow: hidden;
}

.choice-group,
.result-card,
.notes,
.form-panel {
  margin: 0;
  padding-left: 24px;
  padding-right: 24px;
}

.choice-group {
  border: 0;
  padding-top: 8px;
  padding-bottom: 8px;
}

.choice-group-room {
  margin-top: 16px;
}

.choice-group-service {
  margin-top: 16px;
}

.field-title {
  display: block;
  width: 100%;
  margin: 0 0 16px;
  padding: 0;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 700;
  color: var(--color-text-dark);
}

.option-grid,
.option-stack {
  display: grid;
  gap: 12px;
}

.option-grid-regions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.option-grid-rooms {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.option-stack {
  grid-template-columns: 1fr;
}

.option-card {
  position: relative;
  display: block;
  cursor: pointer;
}

.option-card input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.option-card span {
  display: flex;
  align-items: center;
  min-height: 64px;
  padding: 16px 18px;
  border: 1px solid rgba(79, 98, 114, 0.15);
  border-radius: 16px;
  background: var(--color-card);
  color: var(--color-text-dark);
  line-height: 1.35;
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease, color 0.22s ease;
}

.option-card:hover span {
  transform: translateY(-1px);
  border-color: rgba(76, 175, 80, 0.35);
  box-shadow: 0 12px 24px rgba(53, 74, 89, 0.08);
}

.option-card input:focus-visible + span {
  outline: 2px solid rgba(76, 175, 80, 0.45);
  outline-offset: 2px;
}

.option-card input:checked + span {
  border-color: var(--color-accent);
  background: linear-gradient(180deg, #ffffff 0%, #f1faf2 100%);
  color: #256d2b;
  box-shadow: 0 14px 28px rgba(76, 175, 80, 0.12);
}

.option-card-region input:checked + span::after,
.option-card-service input:checked + span::after,
.option-card-room input:checked + span::after {
  content: "";
  position: absolute;
  top: 14px;
  right: 14px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 0 6px var(--color-accent-soft);
}

.option-card-service span {
  min-height: 58px;
}

.option-card-room span {
  min-height: 58px;
  justify-content: center;
  text-align: center;
  padding: 14px 12px;
}

.result-card {
  position: relative;
  margin: 24px 24px 0;
  padding-top: 24px;
  padding-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--color-result-bg);
  border-radius: 18px;
  box-shadow: inset 0 0 0 1px rgba(76, 175, 80, 0.06);
}

.result-title {
  color: #04940b;
  font-weight: 700;
  line-height: 1.2;
}

.result-title-main {
  font-size: 24px;
}

.result-sum-wrap {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  color: #04940b;
}

.result-sum {
  font-size: 24px;
  line-height: 1;
  font-weight: 700;
  color: inherit;
  font-variant-numeric: tabular-nums;
}

.result-currency {
  font-size: 18px;
  line-height: 1;
  color: #04940b;
}

.result-empty {
  width: 100%;
  margin: -4px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: #6e7880;
}

.result-details {
  width: 100%;
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.result-detail {
  margin: 0;
  font-size: 14px;
  line-height: 1.08;
  color: var(--color-note);
}

.result-detail-highlight {
  color: #256d2b;
  font-weight: 700;
}

.result-detail-always {
  color: #5e6870;
}

.form-panel {
  margin: 30px 24px 0;
  padding-top: 24px;
  padding-bottom: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdfb 100%);
  border: 1px solid rgba(76, 175, 80, 0.18);
  border-radius: 18px;
  box-shadow: 0 14px 30px rgba(53, 74, 89, 0.06);
}

.intro-text {
  padding: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--color-intro);
}

.field {
  padding-top: 12px;
  padding-bottom: 18px;
}

.field-title-accent {
  color: #04940b;
}

.field-control {
  position: relative;
}

.field-control input {
  width: 100%;
  border: 0;
  border-bottom: 2px solid var(--color-border);
  border-radius: 0;
  padding: 0 0 8px;
  background: transparent;
  color: var(--color-text);
  font-size: 14px;
  line-height: 1.5;
  transition: border-color 0.25s ease, color 0.25s ease;
  appearance: none;
}

.field-control input::placeholder {
  color: #616161;
}

.field-control input:focus {
  outline: none;
  border-bottom-color: var(--color-accent);
}

.field-error {
  min-height: 18px;
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.35;
  color: var(--color-alert);
}

.field-error:empty {
  display: none;
}

.submit-row {
  padding-top: 12px;
  padding-bottom: 0;
}

.submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  border: 1px solid #7b0900;
  border-radius: 10px;
  padding: 0 24px;
  background: linear-gradient(to bottom, #b3170a 0%, #920b00 58%, #7d0900 100%);
  color: #ffffff;
  font-size: 16px;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 2px 6px rgba(0, 0, 0, 0.16);
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.submit-button:hover,
.submit-button:focus-visible {
  background: linear-gradient(to bottom, #bf1a0c 0%, #9e1002 58%, #870900 100%);
  border-color: #7b0900;
  transform: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 3px 8px rgba(0, 0, 0, 0.18);
}

.submit-button:active {
  transform: translateY(1px);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.18), 0 1px 4px rgba(0, 0, 0, 0.14);
}

.submit-button:disabled {
  cursor: wait;
  opacity: 0.75;
  transform: none;
  box-shadow: none;
}

.submit-button-secondary {
  background: #ffffff;
  color: var(--color-accent);
  border-radius: 12px;
  border-color: var(--color-accent);
}

.submit-button-secondary:hover,
.submit-button-secondary:focus-visible {
  background: var(--color-accent);
  color: #ffffff;
}

.consent-text {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-note);
}

.consent-text input {
  accent-color: var(--color-accent);
  margin-top: 3px;
}

.consent-label {
  cursor: pointer;
}

.form-status {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.5;
}

.form-status.is-error {
  background: rgba(216, 67, 67, 0.09);
  color: #a12d2d;
}

.form-status.is-success {
  background: rgba(76, 175, 80, 0.12);
  color: #256d2b;
}

.notes {
  padding-top: 12px;
  padding-bottom: 18px;
  color: var(--color-note);
  font-size: 15px;
  line-height: 1.5;
}

.notes p {
  margin: 0 0 10px;
}

.thanks-card {
  margin: 0;
  padding: 72px 24px;
  text-align: center;
  animation: fadeIn 260ms ease;
}

.thanks-card h2 {
  margin: 0 0 20px;
  font-size: 34px;
  line-height: 1.1;
  color: var(--color-text-dark);
}

.thanks-card p {
  margin: 0 0 28px;
  font-size: 15px;
  color: var(--color-note);
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: revealUp 560ms cubic-bezier(0.2, 0.75, 0.2, 1) forwards;
  animation-delay: var(--delay, 0ms);
}

.is-invalid {
  animation: shake 380ms ease;
}

@keyframes revealUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes shake {
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-7px);
  }

  20%,
  40%,
  60%,
  80% {
    transform: translateX(7px);
  }
}

@media (max-width: 760px) {
  .choice-group,
  .result-card,
  .notes,
  .form-panel {
    padding-left: 20px;
    padding-right: 20px;
  }

  .result-card,
  .form-panel {
    margin-left: 20px;
    margin-right: 20px;
  }

  .option-grid-regions,
  .option-grid-rooms {
    grid-template-columns: 1fr 1fr;
  }

  .result-title-main,
  .result-sum {
    font-size: 22px;
  }
}

@media (max-width: 560px) {
  .choice-group {
    padding-left: 0;
    padding-right: 0;
  }

  .option-grid,
  .option-stack {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .result-card,
  .form-panel {
    margin-left: 0;
    margin-right: 0;
  }

  .form-panel {
    margin-top: 30px;
  }

  .option-grid-regions,
  .option-grid-rooms {
    grid-template-columns: 1fr;
  }

  .result-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .thanks-card {
    padding: 56px 20px;
  }

  .thanks-card h2 {
    font-size: 28px;
  }
}
