/* Четыре сохранённые схемы. Роли одни и те же, меняются только цвета. */

html[data-scheme="cinnamon"] {
  --page: #f3e0cc;
  --card: #fff6ec;
  --text: #3c2416;
  --muted: #8a6248;
  --link: #9a4318;
  --primary: #b85a28;
  --primary-text: #fff6ec;
  --secondary: #e7cdb4;
  --secondary-text: #3c2416;
  --field: #fff6ec;
  --field-border: #e0c2a4;
  --error: #8c2f2f;
  --success: #3e6b45;
  --header: #6e3a1c;
  --header-text: #f3e0cc;
}

html[data-scheme="twina"] {
  --page: #f4f1ea;
  --card: #fffcf7;
  --text: #2a3330;
  --muted: #6e736e;
  --link: #2f6f62;
  --primary: #2f6f62;
  --primary-text: #f4f1ea;
  --secondary: #dde6e0;
  --secondary-text: #2a3330;
  --field: #fffcf7;
  --field-border: #d0d6d0;
  --error: #8e3b3b;
  --success: #2f6b52;
  --header: #24332e;
  --header-text: #f4f1ea;
}

html[data-scheme="mocha"] {
  --page: #1a120e;
  --card: #2a1c16;
  --text: #f6e8d8;
  --muted: #c8b09a;
  --link: #e2c09a;
  --primary: #d4b48a;
  --primary-text: #1a120e;
  --secondary: #3c2c24;
  --secondary-text: #f6e8d8;
  --field: #221610;
  --field-border: #4e3a2e;
  --error: #f0b0a4;
  --success: #c6d4b0;
  --header: #100c0a;
  --header-text: #f6e8d8;
}

html[data-scheme="blackberry"] {
  --page: #160e18;
  --card: #261628;
  --text: #f6eaf4;
  --muted: #c8b0c4;
  --link: #e8a8d0;
  --primary: #a03d78;
  --primary-text: #f6eaf4;
  --secondary: #3a243c;
  --secondary-text: #f6eaf4;
  --field: #1e1220;
  --field-border: #4c344e;
  --error: #f0b0bc;
  --success: #c8deb8;
  --header: #0e0a12;
  --header-text: #f6eaf4;
}

body {
  background: var(--page);
  color: var(--text);
  min-height: 100vh;
}

a {
  color: var(--link);
}

.site-header {
  background: var(--header);
  color: var(--header-text);
}

.site-header a {
  color: var(--header-text);
  text-decoration: none;
}

.site-header .btn-quiet {
  color: var(--secondary-text);
}

.site-card {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--field-border);
  border-radius: 12px;
  padding: 1.25rem;
}

.site-muted {
  color: var(--muted);
}

.btn-site {
  background: var(--primary);
  color: var(--primary-text);
  border: 0;
}

.btn-site:hover {
  background: var(--primary);
  color: var(--primary-text);
  filter: brightness(1.05);
}

.btn-quiet {
  background: var(--secondary);
  color: var(--secondary-text);
  border: 0;
}

.btn-danger-site {
  background: transparent;
  color: var(--error);
  border: 1px solid var(--error);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
select,
textarea {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: var(--field);
  color: var(--text);
  border: 1px solid var(--field-border);
  border-radius: 8px;
}

label {
  display: block;
  margin-bottom: 0.25rem;
}

.form-check label,
.scheme-label {
  display: inline;
}

.errorlist {
  color: var(--error);
  list-style: none;
  padding-left: 0;
  margin: 0.25rem 0 0;
}

.alert-site {
  background: var(--card);
  border: 1px solid var(--field-border);
  color: var(--text);
}

.site-header {
  position: relative;
  z-index: 20;
}

.site-header-row,
.site-header-actions,
.site-menu-wide {
  display: flex;
  align-items: center;
}

.site-header-row {
  justify-content: space-between;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
}

.site-header-actions,
.site-menu-wide {
  gap: 0.5rem 0.75rem;
  flex-wrap: wrap;
}

.site-brand {
  font-size: 1.25rem;
  line-height: 1.2;
}

.site-menu-wide .site-menu-link {
  color: var(--header-text);
  text-decoration: none;
  padding-bottom: 0.1rem;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.site-menu-wide .site-menu-link.is-current {
  border-bottom-color: var(--header-text);
}

.site-menu-wide .site-menu-auth {
  margin: 0;
}

.site-menu-phone {
  display: none;
}

.btn-icon {
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--header-text) 45%, transparent);
  background: transparent;
  color: var(--header-text);
  flex: 0 0 auto;
}

.btn-icon:hover,
.btn-icon:focus-visible {
  background: color-mix(in srgb, var(--header-text) 12%, transparent);
  color: var(--header-text);
}

.dropdown-menu.site-menu-panel {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--field-border);
  border-radius: 12px;
  padding: 0.5rem;
  min-width: 16rem;
}

.site-menu-panel .site-menu-link {
  display: block;
  color: var(--text);
  text-decoration: none;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
}

.site-menu-panel .site-menu-link.is-current {
  background: var(--secondary);
  color: var(--secondary-text);
}

.site-menu-rule {
  border: 0;
  border-top: 1px solid var(--field-border);
  margin: 0.5rem 0;
  opacity: 1;
}

.site-menu-panel .site-menu-auth,
.site-menu-panel .btn {
  display: block;
  width: 100%;
}

.cabinet-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cabinet-tab {
  display: inline-block;
  text-decoration: none;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--secondary);
  color: var(--secondary-text);
}

.cabinet-tab.is-current {
  background: var(--primary);
  color: var(--primary-text);
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0;
}

.modal-content.site-modal {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--field-border);
}

.site-modal .modal-header,
.site-modal .modal-footer {
  border-color: var(--field-border);
}

.btn-modal-close {
  padding: 0.25rem 0.6rem;
  border-radius: 8px;
}

.scheme-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.scheme-choice {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  border: 2px solid transparent;
  background: var(--secondary);
  color: var(--secondary-text);
}

.scheme-choice.is-current {
  border-color: var(--primary);
}

.row-link {
  display: block;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--field-border);
  color: inherit;
  text-decoration: none;
}

@media (max-width: 767.98px) {
  main .btn-site,
  main .btn-quiet,
  main .btn-danger-site {
    width: 100%;
  }

  .page-actions {
    flex-direction: column;
  }
}

@media (max-width: 575.98px) {
  .site-menu-wide {
    display: none;
  }

  .site-menu-phone {
    display: block;
  }
}
