html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
}

body > .container {
  flex: 1 0 auto;
}

.login-info-box-container {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
  margin-top: -.75rem;
}

.login-info-box {
  background: #f6f7f4;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  color: #2f3b33;
  font-size: .9rem;
  line-height: 1.35;
  max-height: 220px;
  min-height: 140px;
  overflow: auto;
  overflow-wrap: anywhere;
  padding: .75rem;
  white-space: pre-wrap;
  width: min(320px, 100%);
}

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

.home-hero {
  align-items: center;
  background-image: linear-gradient(90deg, rgba(20, 31, 22, .72), rgba(20, 31, 22, .28)), url('/images/isakatorp-home.jpg');
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  background-color: #111d13;
  color: #fff;
  display: flex;
  left: 50%;
  margin-left: -50vw;
  min-height: calc(100vh - 150px);
  min-height: calc(100svh - 150px);
  padding: clamp(3rem, 8vw, 7rem) clamp(1.25rem, 6vw, 5rem);
  position: relative;
  width: 100vw;
}

.home-hero__content {
  max-width: 680px;
}

.home-hero h1 {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 700;
  line-height: .95;
  margin-bottom: 1rem;
  text-shadow: 0 4px 20px rgba(0, 0, 0, .75), 0 1px 2px rgba(0, 0, 0, .85);
}

.home-hero p {
  font-size: clamp(1.2rem, 2vw, 1.65rem);
  margin-bottom: 1.75rem;
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.information-page {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 760px;
}

.information-info-box {
  max-height: none;
  width: 100%;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

.number-stepper {
  align-items: stretch;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2.5rem;
}

.number-stepper__input {
  border-bottom-right-radius: 0;
  border-top-right-radius: 0;
}

.number-stepper__input::-webkit-inner-spin-button,
.number-stepper__input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.number-stepper__buttons {
  display: grid;
  grid-template-rows: repeat(2, 1fr);
}

.number-stepper__button {
  align-items: center;
  background: #f8f9fa;
  border: 1px solid #ced4da;
  color: #212529;
  display: inline-flex;
  font-size: .75rem;
  justify-content: center;
  line-height: 1;
  min-height: 1.2rem;
  padding: 0;
}

.number-stepper__button:first-child {
  border-bottom: 0;
  border-bottom-right-radius: 0;
  border-top-right-radius: .375rem;
}

.number-stepper__button:last-child {
  border-bottom-right-radius: .375rem;
  border-top-right-radius: 0;
}

.number-stepper__button:hover,
.number-stepper__button:focus-visible {
  background: #e9ecef;
}

.booking-page {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.booking-header {
  align-items: end;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.booking-header h1,
.booking-list-section h2,
.booking-form-panel h2 {
  margin-bottom: .25rem;
}

.booking-month-nav {
  align-items: center;
  display: flex;
  gap: .75rem;
  white-space: nowrap;
}

.booking-shell {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
}

.booking-calendar-panel,
.booking-form-panel,
.booking-list-item {
  border: 1px solid #dee2e6;
  border-radius: 8px;
}

.booking-calendar-panel {
  overflow: hidden;
}

.booking-weekdays,
.booking-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.booking-weekdays {
  background: #f6f7f4;
  border-bottom: 1px solid #dee2e6;
}

.booking-weekdays span {
  color: #526156;
  font-size: .9rem;
  font-weight: 700;
  padding: .75rem .5rem;
  text-align: center;
}

.booking-day {
  aspect-ratio: 1 / .78;
  background: #fff;
  border: 0;
  border-bottom: 1px solid #e9ecef;
  border-right: 1px solid #e9ecef;
  color: #212529;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  justify-content: space-between;
  min-height: 96px;
  padding: .55rem;
  text-align: left;
  user-select: none;
}

.booking-day:nth-child(7n) {
  border-right: 0;
}

.booking-day:hover {
  background: #eef6ed;
}

.booking-day:focus-visible {
  outline: 3px solid #258cfb;
  outline-offset: -3px;
}

.booking-day.is-muted {
  background: #f8f9fa;
  color: #8a918b;
}

.booking-day.is-today .booking-day__number {
  background: #214c32;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  height: 1.85rem;
  justify-content: center;
  line-height: 1.85rem;
  width: 1.85rem;
}

.booking-day.is-booked {
  background: #fff4e5;
}

.booking-day.is-blocked {
  background: #f3d9dc;
  color: #7a1f2b;
  cursor: not-allowed;
}

.booking-day.is-past {
  background: #f1f3f2;
  color: #8a918b;
  cursor: not-allowed;
}

.booking-day.is-blocked.is-admin-selectable {
  cursor: pointer;
}

.booking-day.is-selected {
  background: #dcefe1;
  box-shadow: inset 0 0 0 2px #3d7d4f;
}

.booking-day__number {
  font-weight: 700;
}

.booking-day__status {
  color: #8a4b0f;
  font-size: .8rem;
  font-weight: 700;
  line-height: 1.2;
}

.booking-day__booker-name,
.booking-day__booker-email {
  display: block;
  overflow-wrap: anywhere;
}

.booking-day__booking + .booking-day__booking {
  margin-top: .45rem;
}

.booking-day__booker-email {
  color: inherit;
  font-size: .72rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.booking-day__cancel-form {
  margin-top: .3rem;
}

.booking-day__cancel {
  font-size: .72rem;
  line-height: 1.1;
  padding: .15rem .35rem;
  white-space: normal;
}

.booking-day.is-blocked .booking-day__status {
  color: #7a1f2b;
}

.booking-day__blocked-reason {
  display: block;
  overflow-wrap: anywhere;
}

.booking-day__blocked-reason + .booking-day__blocked-reason {
  margin-top: .25rem;
}

.booking-form-panel {
  padding: 1rem;
}

.booking-price-estimate {
  background: #f6f7f4;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  margin-bottom: 1rem;
  padding: .85rem;
}

.booking-price-estimate h3 {
  font-size: 1rem;
  margin-bottom: .6rem;
}

.booking-price-estimate dl {
  display: grid;
  gap: .35rem;
  margin: 0;
}

.booking-price-estimate dl > div {
  align-items: baseline;
  display: flex;
  gap: .75rem;
  justify-content: space-between;
}

.booking-price-estimate dt {
  color: #526156;
  font-weight: 600;
}

.booking-price-estimate dd {
  margin: 0;
  text-align: right;
}

.booking-price-estimate__total {
  border-top: 1px solid #dee2e6;
  font-weight: 700;
  margin-top: .25rem;
  padding-top: .45rem;
}

.booking-price-overview p {
  margin-bottom: 0;
  white-space: pre-wrap;
}

.booking-list {
  display: grid;
  gap: .75rem;
}

.booking-list-item {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: .85rem 1rem;
}

.booking-list-item span {
  color: #6c757d;
  display: block;
}

.booking-list-email {
  display: block;
  font-size: .95rem;
  overflow-wrap: anywhere;
}

.masked-email-link {
  overflow-wrap: anywhere;
}

.booking-list-item p {
  margin: .35rem 0 0;
}

.booking-edit {
  margin-top: .85rem;
}

.booking-edit summary {
  cursor: pointer;
  display: inline-block;
  list-style: none;
}

.booking-edit summary::-webkit-details-marker {
  display: none;
}

.booking-edit form {
  margin-top: .85rem;
}

.admin-page {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.admin-email-panel textarea {
  min-height: 260px;
}

.admin-info-box-panel textarea {
  min-height: 120px;
}

.admin-price-panel textarea {
  min-height: 220px;
}

.admin-booking-form-grid {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
}

.admin-booking-blocks {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
}

.admin-period-form {
  align-items: end;
  display: grid;
  flex: 1 1 auto;
  gap: .75rem;
  grid-template-columns: repeat(3, minmax(140px, 1fr)) auto;
}

.messages-page {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.message-compose-panel textarea {
  min-height: 130px;
}

.message-list {
  display: grid;
  gap: 1rem;
}

.message-item {
  align-items: flex-start;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 1rem;
}

.message-item__content {
  min-width: 0;
  width: 100%;
}

.message-item__header,
.message-item__meta {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .75rem;
}

.message-item__header span,
.message-item__meta {
  color: #6c757d;
  font-size: .95rem;
}

.message-item__body {
  margin: .75rem 0 0;
  white-space: pre-wrap;
}

.message-edit {
  margin-top: .85rem;
}

.message-edit summary {
  cursor: pointer;
  display: inline-block;
  list-style: none;
}

.message-edit summary::-webkit-details-marker {
  display: none;
}

.message-edit form {
  margin-top: .85rem;
  max-width: 720px;
}

.development-email-preview-frame {
  border: 0;
  display: block;
  height: min(58vh, 620px);
  width: 100%;
}

.development-email-preview-list {
  display: grid;
  gap: 1rem;
}

.development-email-preview-item {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  overflow: hidden;
}

.development-email-preview-item__header {
  align-items: center;
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  display: flex;
  gap: .75rem;
  justify-content: space-between;
  padding: .75rem 1rem;
}

.development-email-preview-item__header h3 {
  font-size: 1rem;
  margin: 0;
}

@media (max-width: 900px) {
  .booking-header,
  .booking-month-nav,
  .booking-list-item,
  .message-item {
    align-items: stretch;
    flex-direction: column;
  }

  .booking-shell {
    grid-template-columns: 1fr;
  }

  .admin-booking-blocks,
  .admin-booking-form-grid,
  .admin-period-form {
    grid-template-columns: 1fr;
  }

  .booking-day {
    min-height: 86px;
    padding: .4rem;
  }
}
