/* Sign-in door in the header and the e-mail sign-in window (template tab "Sign-in"). */

.auth-door {
  --door: #1f9d55;
  --door-dark: #157a41;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: var(--door);
  text-decoration: none;
}
.auth-door--out { --door: #8a949b; --door-dark: #6b757c; }
.auth-door:hover, .auth-door:focus-visible { background: color-mix(in srgb, var(--door) 10%, transparent); }
.auth-door:focus-visible { outline: 2px solid var(--door); outline-offset: 2px; }

.auth-door__svg { width: 30px; height: 30px; overflow: visible; }
.auth-door__frame, .auth-door__floor { fill: none; stroke: var(--door-dark); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.auth-door__gap { fill: #fff3c4; }
.auth-door--out .auth-door__gap { fill: #e9ecef; }
.auth-door__leaf rect { fill: var(--door); stroke: var(--door-dark); stroke-width: .8; }
.auth-door__knob { fill: #fff; }
.auth-door__leaf {
  transform-box: fill-box;
  transform-origin: left center;
  transition: transform .35s cubic-bezier(.3, .7, .4, 1);
}
/* Door opens a little on hover: the leaf narrows and tilts like a door swinging inwards */
.auth-door:hover .auth-door__leaf,
.auth-door:focus-visible .auth-door__leaf { transform: skewY(-12deg) scaleX(.5); }
@media (prefers-reduced-motion: reduce) {
  .auth-door__leaf { transition: none; }
}

/* Hint under the door */
.auth-door::after {
  content: attr(data-tip);
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--tcts-dark, #0b3b27);
  color: #fff;
  font-size: var(--tcts-fs-s, 13px);
  line-height: 1.3;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .15s, transform .15s;
}
.auth-door:hover::after, .auth-door:focus-visible::after { opacity: 1; transform: none; }
@media (hover: none) { .auth-door::after { display: none; } }

/* ---------------------------------------------------------------- sign-in window */

.auth-dialog {
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  border-radius: var(--tcts-radius-l, 24px);
  background: #fff;
  color: var(--tcts-text, #13241b);
  box-shadow: 0 24px 64px rgba(11, 59, 39, .28);
}
.auth-dialog::backdrop { background: rgba(11, 33, 22, .55); }
.auth-dialog__box { position: relative; display: grid; gap: 14px; padding: 26px 24px 22px; margin: 0; }
.auth-dialog__close {
  position: absolute; top: 10px; right: 10px;
  width: 36px; height: 36px; border: 0; border-radius: 10px;
  background: transparent; color: var(--tcts-muted, #4d5e55); font-size: var(--tcts-fs-xl, 24px); line-height: 1; cursor: pointer;
}
.auth-dialog__close:hover { background: var(--tcts-tint, #eaf4ee); }
.auth-dialog__head { display: flex; align-items: center; gap: 12px; padding-right: 32px; }
.auth-dialog__door { --door: #1f9d55; --door-dark: #157a41; display: inline-flex; }
.auth-dialog__door .auth-door__svg { width: 38px; height: 38px; }
.auth-dialog__door .auth-door__leaf { transform: skewY(-9deg) scaleX(.62); }
.auth-dialog__title { margin: 0; font-size: var(--tcts-fs-l, 20px); }
.auth-dialog__msg { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--tcts-tint, #eaf4ee); font-size: var(--tcts-fs-m, 15px); }
.auth-dialog__msg.is-error { background: #fdecec; color: #8a1c1c; }

.auth-step { display: grid; gap: 12px; }
.auth-step[hidden] { display: none; }
.auth-field { display: grid; gap: 6px; font-size: var(--tcts-fs-m, 15px); font-weight: 600; }
.auth-field input {
  width: 100%; min-height: 46px; padding: 10px 12px;
  border: 1px solid var(--tcts-line-strong, #c9d4cd); border-radius: 12px;
  font: inherit; font-weight: 400; font-size: var(--tcts-fs-base, 17px);
}
.auth-field input:focus { outline: 2px solid var(--tcts-brand, #146c43); outline-offset: 1px; border-color: transparent; }
.auth-field input[name="code"] { font-size: var(--tcts-fs-xl, 24px); letter-spacing: .2em; text-align: center; }
.auth-check { display: flex; gap: 8px; align-items: flex-start; font-size: var(--tcts-fs-m, 15px); font-weight: 400; line-height: 1.35; }
.auth-check input { margin-top: 2px; }
.auth-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.auth-actions .btn { flex: 1 1 160px; justify-content: center; }
.auth-actions .btn--ghost { border: 1px solid var(--tcts-line-strong, #c9d4cd); }
.auth-actions .btn[disabled] { opacity: .6; cursor: progress; }
.auth-hint { margin: 0; font-size: var(--tcts-fs-m, 15px); color: var(--tcts-muted, #4d5e55); }
.auth-link { padding: 0; border: 0; background: none; color: var(--tcts-brand, #146c43); font: inherit; text-decoration: none; cursor: pointer; }
.auth-link[disabled] { color: var(--tcts-muted, #4d5e55); text-decoration: none; cursor: default; }
.auth-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

@media print { .auth-door, .auth-dialog { display: none !important; } }

/* ---------------------------------------------------------------- personal cabinet and lobby */

.cab-dialog { width: min(480px, calc(100vw - 32px)); }
.cab-step { display: grid; gap: 14px; }
.cab-step[hidden] { display: none; }
.cab-icon { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.cab-head-icon { color: var(--tcts-brand, #146c43); }
.cab-head-icon .cab-icon { width: 38px; height: 38px; }
.cab-dialog .auth-dialog__head .auth-hint { margin-top: 2px; }

/* Doors of the rooms: an arch on top like a door */
.cab-rooms { display: grid; gap: 10px; }
.cab-room {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 14px;
  border: 1px solid var(--tcts-line-strong, #c9d4cd); border-radius: 14px;
  background: #fff; color: inherit; font: inherit; text-align: left; text-decoration: none; cursor: pointer;
  transition: border-color .15s, background .15s, transform .15s;
}
.cab-room:hover, .cab-room:focus-visible { border-color: var(--tcts-brand, #146c43); background: var(--tcts-tint, #eaf4ee); transform: translateY(-1px); }
.cab-room:focus-visible { outline: 2px solid var(--tcts-brand, #146c43); outline-offset: 2px; }
.cab-room__door {
  display: grid; place-items: center; flex: 0 0 auto; width: 48px; height: 56px;
  border-radius: 24px 24px 6px 6px; background: var(--tcts-tint, #eaf4ee); color: var(--tcts-brand, #146c43);
  border: 1px solid var(--tcts-line-strong, #c9d4cd);
}
.cab-room:hover .cab-room__door { background: #fff; }
.cab-room__text { display: grid; gap: 2px; min-width: 0; }
.cab-room__text strong { font-size: var(--tcts-fs-base, 17px); }
.cab-room__text small { color: var(--tcts-muted, #4d5e55); font-size: var(--tcts-fs-s, 13px); line-height: 1.3; }

.cab-info { display: grid; gap: 0; margin: 0; }
.cab-info > div { display: grid; grid-template-columns: 9.5em 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--tcts-line, #e1e8e3); }
.cab-info > div:last-child { border-bottom: 0; }
.cab-info dt { color: var(--tcts-muted, #4d5e55); font-size: var(--tcts-fs-m, 15px); }
.cab-info dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 420px) { .cab-info > div { grid-template-columns: 1fr; gap: 2px; } }
@media (prefers-reduced-motion: reduce) { .cab-room { transition: none; } .cab-room:hover { transform: none; } }

/* ---------------------------------------------------------------- request window "Get a quote" */

.req-dialog { width: min(560px, calc(100vw - 32px)); }
.req-box { gap: 12px; }
.req-step { display: grid; gap: 12px; }
.req-step[hidden] { display: none; }
.req-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 460px) { .req-row { grid-template-columns: 1fr; } }
.auth-field small { font-weight: 400; color: var(--tcts-muted, #4d5e55); }
.auth-field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--tcts-line-strong, #c9d4cd); border-radius: 12px;
  font: inherit; font-weight: 400; font-size: var(--tcts-fs-base, 17px); resize: vertical; min-height: 96px;
}
.auth-field textarea:focus { outline: 2px solid var(--tcts-brand, #146c43); outline-offset: 1px; border-color: transparent; }
.auth-field input.is-bad, .auth-field textarea.is-bad { border-color: #b3261e; }

.req-files { display: grid; gap: 8px; }
.req-files__label { font-size: var(--tcts-fs-m, 15px); font-weight: 600; }
.req-drop {
  position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 16px; cursor: pointer;
  border: 2px dashed var(--tcts-line-strong, #c9d4cd); border-radius: 14px; background: var(--tcts-ground, #f7f9f6);
  color: var(--tcts-brand, #146c43); transition: border-color .15s, background .15s;
}
.req-drop:hover, .req-drop.is-over, .req-drop:focus-within { border-color: var(--tcts-brand, #146c43); background: var(--tcts-tint, #eaf4ee); }
.req-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.req-drop .cab-icon { width: 34px; height: 34px; flex: 0 0 auto; }
.req-drop span { display: grid; gap: 2px; color: var(--tcts-text, #13241b); }
.req-drop small { color: var(--tcts-muted, #4d5e55); font-size: var(--tcts-fs-s, 13px); }
.req-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.req-list li { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 7px 10px; border-radius: 10px; background: var(--tcts-tint, #eaf4ee); font-size: var(--tcts-fs-m, 15px); }
.req-list li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.req-list small { color: var(--tcts-muted, #4d5e55); }
.req-list__rm { width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: var(--tcts-muted, #4d5e55); font-size: var(--tcts-fs-l, 20px); line-height: 1; cursor: pointer; }
.req-list__rm:hover { background: #fff; color: #b3261e; }

.req-captcha { display: flex; gap: 12px; align-items: flex-start; }
.req-captcha__pic { display: grid; gap: 4px; justify-items: start; flex: 0 0 auto; }
.req-captcha__pic .auth-link { font-size: var(--tcts-fs-s, 13px); }
.req-captcha img { border-radius: 10px; border: 1px solid var(--tcts-line-strong, #c9d4cd); background: #eef5f0; }
.req-captcha__field { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; height: 52px; font-size: var(--tcts-fs-m, 15px); font-weight: 600; }
.req-captcha__field span { flex: 0 0 auto; }
.req-captcha__field input { flex: 1 1 auto; min-width: 0; width: 100%; font: inherit; padding: 12px 14px; border: 1px solid var(--tcts-line-strong, #c9d4cd); border-radius: 14px; background: #fff; text-transform: uppercase; letter-spacing: .15em; font-weight: 700; }
.req-captcha__field input:focus { outline: 2px solid var(--tcts-brand, #146c43); outline-offset: 1px; border-color: transparent; }
@media (max-width: 460px) { .req-captcha { flex-wrap: wrap; } .req-captcha__field { flex-basis: 100%; height: auto; } }
.req-switch { display: inline-flex; align-items: center; gap: 10px; justify-self: start; cursor: pointer; font-size: var(--tcts-fs-m, 15px); font-weight: 600; }
.req-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.req-switch i { position: relative; width: 38px; height: 22px; border-radius: 99px; background: var(--tcts-line-strong, #c9d4cd); transition: background .15s; flex: 0 0 auto; }
.req-switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.req-switch input:checked + i { background: var(--tcts-brand, #146c43); }
.req-switch input:checked + i::after { transform: translateX(16px); }
.req-switch input:focus-visible + i { outline: 2px solid var(--tcts-brand, #146c43); outline-offset: 2px; }
.req-step [hidden] { display: none !important; }
.req-progress { height: 8px; border-radius: 99px; background: var(--tcts-tint, #eaf4ee); overflow: hidden; }
.req-progress span { display: block; height: 100%; width: 0; background: var(--tcts-brand, #146c43); transition: width .2s; }

/* "Need a quote?" block at the end of an article */
.article-request {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px;
  margin: 36px 0 8px; padding: 20px 24px; border-radius: var(--tcts-radius); background: var(--tcts-tint, #eaf4ee); border: 1px solid var(--tcts-line);
}
.article-request p { margin: 0; max-width: 520px; }
.article-request strong { display: block; margin-bottom: 4px; font-size: var(--tcts-fs-base, 17px); }
@media print { .req-dialog, .article-request { display: none !important; } }
.cab-tg { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--tcts-line, #e1e8e3); }
.cab-tg p { margin: 0 0 8px; }
.cab-tg [hidden] { display: none !important; }
.auth-legal a { color: var(--tcts-brand, #146c43); }

/* 1.8.23: request form: no captions above name and e-mail (placeholders instead), vertical phone switch with a small phone icon to the right of e-mail, hint on hover */
.req-row--sw { grid-template-columns: 1fr 1fr auto; align-items: center; }
.req-switch--v { position: relative; display: inline-flex; align-self: center; }
.req-switch--v i { width: 26px; height: 50px; border-radius: 99px; }
.req-switch--v i::after { display: none; }
.req-switch--v i svg { position: absolute; top: 4px; left: 4px; width: 18px; height: 18px; padding: 3px; box-sizing: border-box; border-radius: 50%; background: #fff; fill: none; stroke: var(--tcts-muted, #4d5e55); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.req-switch--v input:checked + i svg { transform: translateY(24px); stroke: var(--tcts-brand, #146c43); }
.req-switch--v::after { content: attr(data-tip); position: absolute; right: 0; bottom: calc(100% + 6px); padding: 5px 9px; border-radius: 6px; background: var(--tcts-dark, #0b3b27); color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .12s; z-index: 5; }
.req-switch--v:hover::after, .req-switch--v:focus-within::after { opacity: 1; }
@media (hover: none) { .req-switch--v::after { display: none; } }
@media (max-width: 460px) {
  .req-row--sw { grid-template-columns: 1fr auto; }
  .req-row--sw > .auth-field:first-child { grid-column: 1 / -1; }
}
