/* Shared fluid layout rules for the public Drevo Zhizni pages. */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

body {
  min-width: 320px;
}

main,
section,
header,
footer,
aside,
article,
form,
fieldset {
  min-width: 0;
}

input,
select,
textarea,
button {
  max-width: 100%;
}

.global-sitebar {
  width: 100%;
  min-width: 0;
  flex-wrap: wrap;
}

.global-sitenav {
  min-width: 0;
}

.global-footer {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-flow: row nowrap;
  flex-direction: row !important;
  align-items: center;
  justify-content: space-between;
  gap: clamp(16px, 3vw, 32px);
}

.global-footer-brand {
  flex: 0 1 auto;
  max-width: 58%;
  white-space: normal;
  overflow-wrap: normal;
}

.global-footer-links {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 8px clamp(14px, 2.2vw, 26px);
}

.global-footer-links a {
  white-space: nowrap;
}

@media (max-width: 820px) {
  .global-sitebar {
    gap: 12px 20px;
    padding-left: clamp(16px, 4vw, 28px);
    padding-right: clamp(16px, 4vw, 28px);
  }

  .global-footer {
    flex-flow: row nowrap;
    flex-direction: row !important;
    align-items: center;
    justify-content: space-between;
    padding-left: clamp(16px, 4vw, 28px);
    padding-right: clamp(16px, 4vw, 28px);
  }
}

@media (max-width: 680px) {
  .global-sitebar {
    align-items: flex-start;
  }

  .global-sitenav {
    width: 100%;
    flex-wrap: wrap;
  }

  .global-footer-links {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .global-footer-links a {
    white-space: normal;
  }

  .shell {
    width: 100%;
    max-width: 100%;
    padding-left: clamp(14px, 4vw, 20px);
    padding-right: clamp(14px, 4vw, 20px);
  }
}

@media (max-width: 360px) {
  .global-sitenav a {
    padding-left: 8px;
    padding-right: 8px;
    font-size: 11px;
  }
}

/* Keep the explicit route link in the compact tree sidebar. */
.space-link {
  grid-column: 1 / 3;
}

@media (max-width: 560px) {
  .space-link {
    grid-column: auto;
  }
}
