:root {
  --theme-bg-color: var(--tg-theme-bg-color, #ffffff);
  --theme-text-color: var(--tg-theme-text-color, #222222);
  --theme-hint-color: var(--tg-theme-hint-color, #a8a8a8);
  --theme-link-color: var(--tg-theme-link-color, #2678b6);
  --theme-button-color: var(--tg-theme-button-color, #50a8eb);
  --theme-button-text-color: var(--tg-theme-button-text-color, #ffffff);
  --theme-secondary-bg-color: var(--tg-theme-secondary-bg-color, #f0f0f0);
  --theme-header-bg-color: var(--tg-theme-header-bg-color, #527da3);
  --theme-accent-text-color: var(--tg-theme-accent-text-color, #1c93e3);
  --theme-section-bg-color: var(--tg-theme-section-bg-color, #ffffff);
  --theme-section-header-text-color: var(--tg-theme-section-header-text-color, #3a95d5);
  --theme-section-separator-color: var(--tg-theme-section-separator-color, #d9d9d9);
  --theme-subtitle-text-color: var(--tg-theme-subtitle-text-color, #82868a);
  --theme-destructive-text-color: var(--tg-theme-destructive-text-color, #cc2929);

  --theme-font-size: 1.6rem;
  --theme-header-font-size: 1.8rem;
  --theme-button-font-size: 1.6rem;
  --theme-font-family-sans: -apple-system, "BlinkMacSystemFont", "Avenir",
    "Avenir Next", "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell",
    "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  --theme-font-family-mono: monaco, "Consolas", "Lucida Console", monospace;
}

/* {
  "bg_color": "#ffffff",
  "section_bg_color": "#ffffff",
  "secondary_bg_color": "#f0f0f0",
  "text_color": "#222222",
  "hint_color": "#a8a8a8",
  "link_color": "#2678b6",
  "button_color": "#50a8eb",
  "button_text_color": "#ffffff",
  "header_bg_color": "#527da3",
  "accent_text_color": "#1c93e3",
  "section_header_text_color": "#3a95d5",
  "subtitle_text_color": "#82868a",
  "destructive_text_color": "#cc2929",
  "section_separator_color": "#d9d9d9"
} */

html {
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
  font-size: 62.5%;
  line-height: 1.15;
  -webkit-text-size-adjust: 100%;
     -moz-text-size-adjust: 100%;
      -ms-text-size-adjust: 100%;
          text-size-adjust: 100%;
}

*,
*::before,
*::after {
  -webkit-box-sizing: inherit;
          box-sizing: inherit;
}

body {
  background-color: var(--theme-bg-color);
  line-height: 1;
  font-size: var(--theme-font-size);
  color: var(--theme-text-color);
  font-family: "Segoe UI", "Helvetica Neue", sans-serif; /* fallback */
  font-family: var(--theme-font-family-sans);
  margin: 0;
  padding: 0;
}

header {
  margin: 0;
  width: 100%;
}

header.main {
  background-color: var(--theme-header-bg-color);
  font-size: 2rem;
  font-weight: 500;
  padding: 1.2rem 1rem;

  display: flex;
  flex-direction: row;
  width: 100%;
  height: 4.8rem;
}

header.section {
  font-size: var(--theme-header-font-size);
  display: block;
  /* margin-block-start: 1em; */
  margin-block-end: 1em;
  margin-inline-start: 0px;
  margin-inline-end: 0px;
  unicode-bidi: isolate;
}

.section-header {
  margin: 1rem;
}

section {
  background-color: var(--theme-section-bg-color);
  padding: 1.2rem;
  border-radius: 1rem;
}

section > header {
  color: var(--theme-section-header-text-color);
  font-size: 1.8rem;
  font-weight: 500;
  margin: 1.2rem;
}

a {
  color: var(--theme-button-text-color);
  text-decoration: none;
}
a:hover:not(.button) {
  opacity: 0.75;
}

.align-center {
  text-align: center;
}

/* #FORMS# */

form {
  font-size: 1.6rem;
  margin: 16px 0;
}

fieldset {
  margin: 0;
  padding: 0;
  border-width: 0;
  padding-bottom: 8px;
}

label {
  display: block;
  color: var(--theme-subtitle-text-color);
}

/* #BUTTONS# */

.button,
[type="button"],
[type="reset"],
[type="submit"],
button {
  color: var(--theme-button-text-color);
  background: var(--theme-button-color);
  font-size: var(--theme-button-font-size);
  font-family: inherit;
  line-height: 2;
  font-weight: 500;
  border: 1px solid transparent;
  border-radius: 4px;
  /* margin: 0.4rem; */
  padding: 0.8rem 1.2rem;
  -webkit-transform: scale(1);
          transform: scale(1);
  -webkit-transition: opacity 0.2s ease;
  transition: opacity 0.2s ease;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
}
.button:hover,
[type="button"]:hover,
[type="reset"]:hover,
[type="submit"]:hover,
button:hover {
  opacity: 0.8;
}
input:disabled,
input:disabled:hover,
button:disabled,
button:disabled:hover {
  opacity: 0.4;
  cursor: not-allowed;
}
.button + .button {
  margin-left: 1rem;
}
.button:active:not(:disabled),
[type="button"]:active:not(:disabled),
[type="reset"]:active:not(:disabled),
[type="submit"]:active:not(:disabled),
button:active:not(:disabled) {
  -webkit-transform: scale(0.98);
          transform: scale(0.98);
}

.card {
  padding: 1rem;
  border-radius: 8px;
  background-color: var(--theme-section-bg-color);
  border: 1px solid var(--theme-section-separator-color);
}

.card > header {
  color: var(--theme-section-header-text-color);
}

.container {
  max-width: var(--grid-maxWidth);
  margin: 0 auto;
  width: 96%;
  padding: 0 calc(var(--grid-gutter) / 2);
}

.full-width {
  width: 100% !important;
}

/*Positioning*/
.float-right {
  float: right !important;
}
.float-left {
  float: left !important;
}

.is-vertical-align {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
}
.is-horizontal-align {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
}

.is-center {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
}

.is-right {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: end;
      -ms-flex-pack: end;
          justify-content: flex-end;
}

.is-left {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: start;
      -ms-flex-pack: start;
          justify-content: flex-start;
}

.row {
  width: 100% !important;
}

input:not([type="checkbox"], [type="radio"], [type="submit"], [type="color"], [type="button"], [type="reset"]),
select,
textarea,
textarea[type="text"] {
  font-family: inherit;
  padding: 0.8rem 1rem;
  border-radius: 4px;
  color: var(--theme-text-color);
  border: 1px solid var(--theme-section-separator-color);
  background-color: var(--theme-section-bg-color);
  font-size: 1em;
  -webkit-transition: all 0.2s ease;
  transition: all 0.2s ease;
  display: block;
  width: 100%;
  margin-top: 0.4rem;
}
/* select {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  background: var(--theme-section-bg-color) no-repeat 100%;
  background-size: 1ex;
  background-origin: content-box;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='60' height='40' fill='%23555'><polygon points='0,0 60,0 30,40'/></svg>");
} */

input:not([type="checkbox"], [type="radio"], [type="submit"], [type="color"], [type="button"], [type="reset"], :disabled):hover,
select:hover,
textarea:hover,
textarea[type="text"]:hover {
  border-color: var(--theme-hint-color);
}
input:not([type="checkbox"], [type="radio"], [type="submit"], [type="color"], [type="button"], [type="reset"]):focus,
select:focus,
textarea:focus,
textarea[type="text"]:focus {
  outline: none;
  border-color: var(--theme-button-colo);
  -webkit-box-shadow: 0 0 1px var(--theme-button-colo);
          box-shadow: 0 0 1px var(--theme-button-colo);
}
input.error:not([type="checkbox"], [type="radio"], [type="submit"], [type="color"], [type="button"], [type="reset"]),
textarea.error {
  border-color: var(--theme-destructive-text-color);
}
input.success:not([type="checkbox"], [type="radio"], [type="submit"], [type="color"], [type="button"], [type="reset"]),
textarea.success {
  border-color: var(--theme-accent-text-color);
}
[type="checkbox"],
[type="radio"] {
  width: 2rem;
  height: 1.6rem;
}

.error {
  border: 1px solid var(--theme-destructive-text-color) !important;
}

/*media*/

@media screen and (max-width: 599px) {
  .container {
    max-width: 100%;
    margin: 0;
    width: 100%;
    padding: 0;
  }
}
