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

:root {
  --brand: #00a87e;
  --brand-active: #00986a;
  --text: #121212;
  --text-muted: #8a8a8a;
  --border: #e2e2e2;
  --bg: #ffffff;
  --overlay: rgba(0, 0, 0, 0.5);
  --btn-disabled-bg: #e0e0e0;
  --btn-disabled-text: #8a8a8a;
  --font: Lato, "Helvetica Neue", Arial, sans-serif;
}

html, body {
  height: 100%;
  font-family: var(--font);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

body.support-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

.page-bg {
  min-height: 100vh;
  background: #fff;
}

.site-header {
  background: #fff;
  box-shadow: 0 2px 8px rgba(18, 18, 18, 0.15);
  padding: 0 24px;
}

.site-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.site-logo {
  font-size: 1.375rem;
  font-weight: 900;
  color: var(--brand);
  letter-spacing: -0.03em;
}

.site-nav {
  display: flex;
  gap: 24px;
  font-size: 0.9375rem;
  font-weight: 700;
}

.site-header__actions {
  margin-left: auto;
  display: flex;
  gap: 20px;
  font-size: 1.125rem;
  font-weight: 700;
}

.site-link--login {
  color: var(--brand);
}

.site-main {
  max-width: 1200px;
  margin: 48px auto;
  padding: 0 24px;
}

.site-main h1 {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.27;
  margin-bottom: 8px;
}

.site-main p {
  font-size: 1.125rem;
  color: var(--text);
  margin-bottom: 32px;
}

.site-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.site-card {
  aspect-ratio: 1;
  background: #e2e2e2;
  border-radius: 8px;
}

.city-search {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.city-search__title {
  font-size: 1.625rem;
  font-weight: 800;
  line-height: 1.54;
  margin-bottom: 24px;
}

.city-search__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px 24px;
}

.city-search__col {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.city-search__col a {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: underline;
  line-height: 1.56;
}

.city-search__col a:hover {
  opacity: 0.7;
}

.city-search__more {
  color: var(--brand) !important;
  text-decoration: none !important;
}

.city-search__more:hover {
  color: var(--brand-active) !important;
  text-decoration: underline !important;
}

.overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  z-index: 100;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 101;
  background: var(--bg);
  border-radius: 8px;
  width: calc(100% - 32px);
  max-width: 476px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.modal[hidden] {
  display: none !important;
}

.modal--login {
  width: calc(100% - 32px);
  max-width: 476px;
  height: auto;
  min-height: 0;
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  overflow: hidden;
}

.modal--login .modal__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0 32px 32px;
  min-height: 0;
}

.modal--login .modal__header {
  padding: 12px 16px 8px;
  grid-template-columns: 56px 1fr 72px;
}

.modal--login .modal__logo {
  margin: 4px 0 24px;
  font-size: 2.375rem;
  line-height: 1.1;
}

.auth-chooser,
.login-email-step {
  display: none !important;
}

.auth-chooser.is-visible,
.login-email-step.is-visible {
  display: flex !important;
  flex-direction: column;
}

.auth-chooser {
  gap: 0;
}

.login-email-step {
  gap: 0;
  width: 100%;
}

.auth-btns {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 999px;
  border: none;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
  cursor: pointer;
  transition: filter 0.15s ease, background 0.15s ease;
}

.auth-btn:active {
  filter: brightness(0.95);
}

.auth-btn__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
}

.auth-btn__icon--google {
  background: #fff;
  border-radius: 50%;
  width: 22px;
  height: 22px;
}

.auth-btn--facebook {
  background: #1877f2;
  color: #fff;
}

.auth-btn--google {
  background: #6b9fd8;
  color: #fff;
}

.auth-btn--apple {
  background: #fff;
  color: #121212;
  border: 1.5px solid #121212;
}

.auth-btn--email {
  background: #fff;
  color: var(--brand);
  border: 1.5px solid var(--brand);
}

.auth-btn--email .auth-btn__icon {
  color: var(--brand);
}

.auth-btn--disabled,
.auth-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.auth-chooser__legal {
  margin-top: 20px;
  text-align: center;
}

.auth-chooser__recaptcha {
  margin-top: 16px;
}

.modal--login .login-form {
  gap: 20px;
}

.modal--login .form-group {
  gap: 8px;
}

.modal--login .form-group label {
  font-size: 0.9375rem;
}

.modal--login .signup-text {
  margin-top: 28px;
  padding-top: 0;
}

.modal--login .recaptcha-text {
  margin-top: 20px;
  padding-bottom: 0;
}

.modal__header {
  display: grid;
  grid-template-columns: 72px 1fr 72px;
  align-items: center;
  padding: 14px 12px 10px;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 1;
  flex-shrink: 0;
}

.modal__header--simple {
  display: block;
  padding: 16px 8px 12px;
}

.modal__nav,
.modal__cancel {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.33;
  user-select: none;
}

.modal__back {
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  font-size: 2rem;
  line-height: 1;
  font-weight: 400;
  color: var(--text);
  cursor: default;
  font-family: var(--font);
}

.modal__cancel {
  text-align: right;
  color: var(--text);
  cursor: default;
}

.modal-loading {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 8px;
}

.modal-loading[hidden],
.error-dialog[hidden],
.login-email-step[hidden],
.auth-chooser[hidden] {
  display: none !important;
}

.error-dialog {
  position: absolute;
  inset: 0;
  z-index: 11;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: #fff;
  border-radius: 8px;
  text-align: center;
}

.error-dialog__title {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
}

.error-dialog__text {
  font-size: 1.125rem;
  line-height: 1.56;
  color: var(--text);
  margin-bottom: 28px;
}

.btn-error-ok {
  max-width: 220px;
  background: var(--brand);
  color: #fff;
}

.btn-error-ok:hover {
  background: var(--brand-active);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e2e2e2;
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.modal--loading .modal__body,
.modal--loading .modal__header {
  pointer-events: none;
}

.modal__title {
  text-align: center;
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1.33;
}

.modal__body {
  padding: 0 32px 32px;
}

.modal__logo {
  text-align: center;
  font-size: 2.375rem;
  font-weight: 900;
  font-family: Lato, "Helvetica Neue", Arial, sans-serif;
  color: var(--brand);
  letter-spacing: -0.04em;
  margin: 8px 0 24px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.6;
  color: var(--text);
}

.input-wrap {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  transition: border-color 0.15s;
}

.input-wrap--focused,
.input-wrap:focus-within {
  border-color: var(--brand);
}

.input-wrap:focus-within {
  border-color: var(--brand-active);
}

.input-wrap input {
  flex: 1;
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.25;
  color: var(--text);
  caret-color: var(--brand);
  padding: 11px 16px;
  min-height: 46px;
}

.input-wrap input::placeholder {
  color: var(--text-muted);
  opacity: 1;
}

.input-wrap .password-toggle {
  font-family: var(--font);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  padding: 11px 16px 11px 0;
  white-space: nowrap;
  user-select: none;
}

.forgot-link {
  display: inline-block;
  padding: 0;
  border: none;
  background: none;
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: underline;
  margin-top: 2px;
  user-select: none;
  cursor: pointer;
  text-align: left;
}

.forgot-link:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.legal-text {
  font-size: 0.78125rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-top: 8px;
}

.legal-text .legal-link {
  color: var(--text);
  font-weight: 700;
  text-decoration: underline;
  user-select: none;
}

.btn-login {
  width: 100%;
  border: none;
  border-radius: 24px;
  font-family: var(--font);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.56;
  cursor: pointer;
  padding: 10px 16px;
  min-height: 46px;
  transition: background-color 0.15s;
  background: var(--btn-disabled-bg);
  color: var(--btn-disabled-text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-login:not(:disabled) {
  background: var(--brand);
  color: #fff;
}

.btn-login:not(:disabled):hover {
  background: var(--brand-active);
}

.btn-login:not(:disabled):active {
  background: var(--brand-active);
}

.btn-login:disabled {
  cursor: not-allowed;
}

.signup-text {
  text-align: center;
  font-size: 1.125rem;
  color: var(--text);
  margin-top: 24px;
}

.signup-link {
  color: var(--brand);
  font-weight: 700;
  user-select: none;
}

.recaptcha-text {
  text-align: center;
  font-size: 0.625rem;
  line-height: 1.4;
  color: var(--text-muted);
  margin-top: 20px;
}

.recaptcha-text .legal-link {
  color: var(--text-muted);
  text-decoration: underline;
  user-select: none;
}

.modal--verify {
  max-width: 476px;
  display: flex;
  flex-direction: column;
}

.modal__header--verify {
  display: flex;
  justify-content: flex-end;
  padding: 12px 16px 0;
}

.modal__close {
  font-size: 1.75rem;
  line-height: 1;
  color: var(--text);
  user-select: none;
  opacity: 0.85;
}

.verify-body {
  padding: 0 32px 32px;
}

.verify-title {
  font-size: 1.625rem;
  font-weight: 800;
  line-height: 1.38;
  margin-bottom: 16px;
}

.verify-text {
  font-size: 1.125rem;
  line-height: 1.56;
  color: var(--text);
  margin-bottom: 8px;
}

.verify-text strong {
  font-weight: 700;
}

.code-field {
  position: relative;
  margin: 32px 0 28px;
  cursor: text;
}

.code-field__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  border: none;
  background: transparent;
  cursor: text;
  font-size: 16px;
}

.code-field__slots {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.code-slot {
  width: 36px;
  height: 44px;
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 6px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  transition: border-color 0.15s;
}

.code-slot--active {
  border-bottom-color: var(--brand);
}

.code-slot--filled {
  border-bottom-color: var(--brand);
}

.verify-resend {
  text-align: center;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 28px;
  user-select: none;
}

.btn-verify {
  margin-top: 4px;
}

@media (min-width: 720px) {
  .modal--login {
    width: 476px;
    max-width: 476px;
    min-height: 712px;
    height: auto;
    max-height: min(800px, calc(100vh - 48px));
    top: 50%;
    left: 50%;
    bottom: auto;
    right: auto;
    transform: translate(-50%, -50%);
    border-radius: 8px;
  }

  .modal--login .modal__body {
    padding: 0 40px 36px;
  }
}

@media (max-width: 719px) {
  .modal {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    transform: none;
    width: 100%;
    max-width: 100%;
    max-height: calc(100dvh - 20px);
    min-height: 0;
    height: auto;
    border-radius: 12px 12px 0 0;
  }

  .modal--login {
    min-height: 0;
    max-height: 100dvh;
    height: auto;
  }

  .modal--login .modal__body {
    padding: 0 20px 28px;
  }

  .modal--login .modal__logo {
    font-size: 2rem;
    margin: 0 0 24px;
  }

  .input-wrap input,
  .support-chat__input,
  .code-field__input {
    font-size: 16px;
  }

  .modal__body {
    padding: 0 16px 16px;
  }

  .verify-body {
    padding: 0 16px 24px;
  }

  .code-field__slots {
    gap: 8px;
    padding: 0 4px;
  }

  .code-slot {
    flex: 1;
    width: auto;
    max-width: 44px;
    height: 48px;
    font-size: 1.375rem;
  }

  .modal--verify {
    z-index: 102;
    max-height: 100dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .modal--verify .verify-title {
    font-size: 1.375rem;
    margin-bottom: 12px;
  }

  .modal--verify .verify-text {
    font-size: 1rem;
    line-height: 1.45;
  }

  .modal--verify .code-field {
    margin: 20px 0 16px;
  }

  .modal--verify .verify-resend {
    font-size: 1rem;
    margin-bottom: 16px;
  }

  .modal--verify .btn-verify {
    margin-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }

  body.verify-open {
    overflow: hidden;
  }

  .site-nav {
    display: none;
  }

  .site-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .city-search__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Support chat widget */
.support-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 200;
  font-family: var(--font);
}

.support-widget__btn {
  width: 60px;
  height: 60px;
  border: none;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 168, 126, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
}

.support-widget__btn:hover {
  background: var(--brand-active);
  transform: scale(1.05);
}

.support-widget--open .support-widget__icon--chat {
  display: none;
}

.support-widget--open .support-widget__icon--close {
  display: block !important;
}

.support-chat {
  position: absolute;
  right: 0;
  bottom: 76px;
  width: 360px;
  max-width: calc(100vw - 32px);
  height: 480px;
  max-height: calc(100dvh - 120px);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: supportSlideUp 0.25s ease;
}

.support-chat[hidden] {
  display: none !important;
}

@keyframes supportSlideUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.support-chat__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 14px;
  background: var(--brand);
  color: #fff;
}

.support-chat__title {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

.support-chat__status {
  display: block;
  font-size: 0.75rem;
  opacity: 0.9;
  margin-top: 2px;
}

.support-chat__close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  opacity: 0.85;
}

.support-chat__close:hover {
  opacity: 1;
}

.support-chat__messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f7f7f7;
}

.support-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.875rem;
  line-height: 1.45;
  word-break: break-word;
}

.support-msg--agent {
  align-self: flex-start;
  background: #fff;
  color: var(--text);
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.support-msg--user {
  align-self: flex-end;
  background: var(--brand);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.support-chat__form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border);
  background: #fff;
}

.support-chat__input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 10px 16px;
  font-size: 16px;
  font-family: inherit;
  outline: none;
}

.support-chat__input:focus {
  border-color: var(--brand);
}

.support-chat__send {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}

.support-chat__send:disabled {
  background: var(--btn-disabled-bg);
  color: var(--btn-disabled-text);
  cursor: default;
}

.support-chat__send:not(:disabled):hover {
  background: var(--brand-active);
}

@media (max-width: 719px) {
  .support-widget {
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
  }

  .support-widget__btn,
  .support-chat {
    pointer-events: auto;
  }

  .support-widget__btn {
    position: fixed;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    z-index: 201;
  }

  .support-widget--open .support-widget__btn {
    display: none;
  }

  .support-chat {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 100%;
    height: min(72dvh, 520px);
    max-height: 85dvh;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .support-chat__form {
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px));
  }
}
