:root {
  --primary-text: #2f2884;
  --primary: #423a84;
  --primary-text-on-dark: #ffffff;
  --red: #da4f51;
  --accent: #d83d3d;
  --head-bg: #d5d3e4;
  --page-bg: #f5f4f8;
  --final-bar: #ecebee;
  --muted: #757575;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: Montserrat, Arial, Helvetica, sans-serif;
  color: var(--primary-text);
  background: var(--page-bg);
  line-height: 1.35;
  font-size: 13px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 16px 8px;
}

.logo img {
  display: block;
  height: 28px;
  width: auto;
}

.phone {
  color: var(--primary-text);
  font-weight: 700;
  text-decoration: none;
  font-size: 18px;
  white-space: nowrap;
}

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 8px 16px 48px;
}

.offer__title {
  margin: 8px 0 20px;
  font-size: 20px;
  font-weight: 400;
  color: var(--primary-text);
  line-height: normal;
}

.content-head,
.final-head {
  font-family: Montserrat, Arial, Helvetica, sans-serif;
  font-weight: 400;
  font-size: 20px;
  margin: 24px 0 12px;
}

.content-head {
  color: var(--primary-text);
}

.final-head {
  color: var(--red);
}

.table-room {
  width: 100%;
  color: var(--primary-text);
  border-spacing: 0;
  border-collapse: separate;
}

.table-room td {
  padding: 6px 0;
  vertical-align: middle;
}

.table-room .price {
  width: auto;
  min-width: 90px;
  text-align: center;
}

.table-room .amountToTable {
  width: auto;
  min-width: 120px;
  text-align: center;
  line-height: 17px;
}

.table-room .withDiscountAmountToTable {
  width: 90px;
  text-align: center;
  line-height: 17px;
  word-wrap: break-word;
}

.table-room .non-first td {
  border-top: 1px solid var(--primary-text);
}

.table-room .row-content .name {
  text-align: left;
}

.table-room .row-content .name span {
  color: var(--red);
  font-weight: 600;
}

.table-room .row-content .price,
.table-room .row-content .amountToTable {
  text-align: center;
}

.table-room .row-content .withDiscountAmountToTable {
  text-align: center;
  font-weight: 600;
}

.table-room .row-content .withDiscountAmountToTable div {
  color: var(--red);
}

.table-room .row-head {
  background-color: var(--head-bg);
  color: var(--primary-text);
  font-weight: 600;
}

.table-room .row-head td {
  text-align: center;
}

.table-room .row-head .name {
  border-radius: 5px 0 0 0;
  text-align: center;
}

.table-room .row-head .withDiscountAmountToTable {
  border-radius: 0 5px 0 0;
  line-height: 17px;
  word-wrap: break-word;
}

.table-room .row-total {
  background-color: var(--primary);
  color: var(--primary-text-on-dark);
}

.table-room .row-total .name {
  border-radius: 0 0 0 5px;
  text-align: right;
}

.table-room .row-total .price {
  text-align: center;
}

.table-room .row-total .amountToTable {
  text-align: center;
}

.table-room .row-total .withDiscountAmountToTable {
  border-radius: 0 0 5px 0;
  text-align: center;
}

.row-final {
  display: flex;
  justify-content: space-between;
  font-family: Montserrat, Arial, Helvetica, sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 16px;
  line-height: 20px;
  background-color: var(--final-bar);
  margin-top: 16px;
}

.row-final .end-date {
  width: 44%;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--primary-text);
  color: #fff;
  border-radius: 5px 0 0 5px;
  height: 60px;
  padding-left: 35px;
}

.row-final .end-date .label {
  position: absolute;
  right: -17px;
  z-index: 1;
}

.row-final .end-date::after {
  content: "";
  width: 0;
  height: 0;
  border-top: 30px solid transparent;
  border-bottom: 30px solid transparent;
  border-left: 30px solid var(--primary-text);
  position: absolute;
  right: -30px;
}

.row-final .amounts {
  width: 15%;
  min-width: 160px;
  display: flex;
  background-color: var(--red);
  color: #fff;
  border-radius: 0 5px 5px 0;
  height: 60px;
  flex-direction: column;
  align-content: flex-end;
  align-items: flex-end;
  justify-content: space-evenly;
  padding-right: 35px;
  position: relative;
  font-size: 18px;
}

.row-final .amounts .value-without-discounts {
  font-size: 16px;
  position: relative;
}

.row-final .amounts .value-without-discounts::before {
  content: "";
  border-bottom: 2px solid var(--primary-text);
  position: absolute;
  width: 98%;
  height: 44%;
  transform: rotate(347deg);
}

.row-final .amounts::after {
  content: "";
  width: 0;
  height: 0;
  border-top: 30px solid transparent;
  border-bottom: 30px solid transparent;
  border-right: 30px solid var(--red);
  position: absolute;
  left: -30px;
}

.manager {
  margin: 24px 0 0;
  font-size: 16px;
  color: var(--muted);
}

.message h1 {
  font-size: 24px;
}

.message a {
  color: var(--red);
}

@media (max-width: 780px) {
  .page,
  .site-header {
    max-width: 100%;
    padding-left: 8px;
    padding-right: 8px;
  }

  .offer__title,
  .content-head,
  .final-head {
    font-size: 15px;
  }

  .phone {
    font-size: 15px;
  }

  .table-room {
    font-size: 10px;
  }

  .table-room .price {
    min-width: 35px;
  }

  .table-room .amountToTable {
    min-width: 53px;
  }

  .table-room .withDiscountAmountToTable {
    width: 60px;
  }

  .table-room td {
    padding: 2px;
  }

  .row-final {
    font-size: 12px;
  }

  .row-final .end-date {
    width: 26%;
    padding-left: 13px;
    padding-right: 17px;
  }

  .row-final .amounts {
    padding-right: 20px;
    width: 25%;
    min-width: 120px;
  }

  .row-final .amounts .value,
  .row-final .amounts .value-without-discounts {
    font-size: 12px;
  }
}
