/* Корневые переменные */
:root {
  --main-color: #12204D;
  --secondary-color: #12204DA6;
  --secondary-color-link: #12204DD9;
  --light-main-color: #eceffb;
  --dark-grey-h3-color: #777777;
  --black: #333333;
  --white: #ffffff;
  --highlighting: #F6D654;
  --site-bg: #f7f9fd;
  --site-bg-alt: #eef1f8;
  --site-surface: #ffffff;
  --site-surface-muted: #f4f7fc;
  --site-surface-strong: #e8eef8;
  --site-text: #1a2334;
  --site-text-muted: rgba(26, 35, 52, 0.72);
  --site-text-soft: rgba(26, 35, 52, 0.56);
  --site-border: rgba(18, 32, 77, 0.1);
  --site-border-strong: rgba(18, 32, 77, 0.18);
  --site-shadow-soft: 0 12px 30px rgba(18, 32, 77, 0.08);
  --site-shadow-card: 0 18px 40px rgba(18, 32, 77, 0.12);
  --site-header-bg: rgba(255, 255, 255, 0.82);
  --site-header-border: rgba(18, 32, 77, 0.08);
  --site-menu-bg: #12204D;
  --site-menu-text: rgba(255, 255, 255, 0.96);
  --site-menu-hover-bg: #ffffff;
  --site-menu-hover-text: #12204D;
  --site-toggle-bg: rgba(255, 255, 255, 0.92);
  --site-toggle-border: rgba(18, 32, 77, 0.12);
  --site-toggle-text: rgba(18, 32, 77, 0.78);
  --site-toggle-icon: #0954AB;
  --site-footer-bg: #12204D;
  --site-footer-text: #ffffff;
}

body:not(.deals-page)[data-theme="light"] {
  --main-color: #0954AB;
  --secondary-color: rgba(9, 84, 171, 0.65);
  --secondary-color-link: rgba(9, 84, 171, 0.85);
  --light-main-color: #eceffb;
  --dark-grey-h3-color: #777777;
  --black: #333333;
  --white: #ffffff;
  --site-bg: #f7f9fd;
  --site-bg-alt: #eef1f8;
  --site-surface: #ffffff;
  --site-surface-muted: #f4f7fc;
  --site-surface-strong: #e8eef8;
  --site-text: #1a2334;
  --site-text-muted: rgba(26, 35, 52, 0.72);
  --site-text-soft: rgba(26, 35, 52, 0.56);
  --site-border: rgba(18, 32, 77, 0.1);
  --site-border-strong: rgba(18, 32, 77, 0.18);
  --site-shadow-soft: 0 12px 30px rgba(18, 32, 77, 0.08);
  --site-shadow-card: 0 18px 40px rgba(18, 32, 77, 0.12);
  --site-header-bg: rgba(255, 255, 255, 0.82);
  --site-header-border: rgba(18, 32, 77, 0.08);
  --site-menu-bg: #12204D;
  --site-menu-text: rgba(255, 255, 255, 0.96);
  --site-menu-hover-bg: #ffffff;
  --site-menu-hover-text: #12204D;
  --site-toggle-bg: rgba(255, 255, 255, 0.92);
  --site-toggle-border: rgba(18, 32, 77, 0.12);
  --site-toggle-text: rgba(18, 32, 77, 0.78);
  --site-toggle-icon: #0954AB;
  --site-footer-bg: #12204D;
  --site-footer-text: #ffffff;
}

body:not(.deals-page)[data-theme="dark"] {
  --main-color: #7AA2FF;
  --secondary-color: rgba(122, 162, 255, 0.32);
  --secondary-color-link: rgba(122, 162, 255, 0.82);
  --light-main-color: rgba(16, 24, 39, 0.96);
  --dark-grey-h3-color: rgba(222, 232, 248, 0.72);
  --black: #E7EEFB;
  --white: #ffffff;
  --site-bg: #0a1220;
  --site-bg-alt: #0e1728;
  --site-surface: rgba(15, 24, 40, 0.94);
  --site-surface-muted: rgba(20, 31, 49, 0.94);
  --site-surface-strong: rgba(25, 38, 59, 0.96);
  --site-text: #EEF4FF;
  --site-text-muted: rgba(238, 244, 255, 0.72);
  --site-text-soft: rgba(238, 244, 255, 0.56);
  --site-border: rgba(122, 162, 255, 0.14);
  --site-border-strong: rgba(122, 162, 255, 0.24);
  --site-shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.28);
  --site-shadow-card: 0 24px 56px rgba(0, 0, 0, 0.38);
  --site-header-bg: rgba(10, 18, 32, 0.84);
  --site-header-border: rgba(122, 162, 255, 0.14);
  --site-menu-bg: rgba(12, 20, 34, 0.96);
  --site-menu-text: #EEF4FF;
  --site-menu-hover-bg: rgba(122, 162, 255, 0.14);
  --site-menu-hover-text: #EEF4FF;
  --site-toggle-bg: rgba(15, 24, 40, 0.92);
  --site-toggle-border: rgba(122, 162, 255, 0.2);
  --site-toggle-text: #DBE6FF;
  --site-toggle-icon: #7AA2FF;
  --site-footer-bg: #08111D;
  --site-footer-text: #DBE6FF;
}

/* Базовые стили */
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  box-sizing: border-box;
  font-family: 'Google Sans', sans-serif;
  background-color: var(--site-bg);
  color: var(--site-text);
}

/* Сброс стилей для ссылок */
a {
  text-decoration: none;
}

/* Header */
header { 
  display: flex; 
  gap: 24px; 
  align-items: center; 
  justify-content: space-between; 
  width: 100%; 
  padding: 24px; 
  font-weight: 400; 
  color: var(--dark-grey-h3-color); 
  font-size: 24px; 
  position: absolute;
  left: 0;
  top: 0; 
  background-color: transparent; 
  box-sizing: border-box; 
}

/* Логотип и иконки */
.logo-container {
  display: flex;
  align-items: center;
  gap: 24px;
  width: auto;
  height: auto;
  padding: 0;
  margin: 0;
}
.logo-a {
  height: 60px;
}
.logo-a img {
  height: 60px;
}
h3 {
  font-weight: 400;
}
.icon-container {
  display: flex;
  gap: 24px;
}
.icon-container div {
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 60px;
}
.calendar-icon {
  width: 60px;
  background-color: var(--main-color);
  border-radius: 16px;
}
.calendar-icon a {
  width: 36px;
  height: 38px;
}
.calendar-icon img {
  width: 36px;
  height: 38px;
}

/* Кнопка и иконка меню */
#button {
  position: relative;
  width: 4rem;
  height: 4rem;
  cursor: pointer;
}
#icon {
  position: absolute;
  top: 0;
  right: 1rem;
  left: 1rem;
  width: auto;
  height: 100%;
}
.lines,
.lines:before,
.lines:after {
  position: absolute;
  display: block;
  width: 100%;
  left: 0;
  background: #FFFFFF;
  transition: 0.3s;
}
.lines {
  height: 3px;
  margin-top: -2px;
  top: 50%;
}
.lines:before,
.lines:after {
  content: '';
  height: 93%;
  transform-origin: 5rem center;
}
.lines:before {
  top: 8px;
}
.lines:after {
  top: -8px;
}
.close {
  transform: scale3d(0.8, 0.8, 0.8);
}
.close .lines {
  background: transparent;
}
.close .lines:before,
.close .lines:after {
  top: 0;
  transform-origin: 50% 50%;
}
.close .lines:before {
  transform: rotate3d(0, 0, 1, 45deg);
}
.close .lines:after {
  transform: rotate3d(0, 0, 1, -45deg);
}

/* Меню */
.menu-icon {
  width: 60px;
  background-color: var(--main-color);
  border-radius: 16px;
  z-index: 9999;
}

body:not(.deals-page) .theme-toggle--header {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 124px;
  height: 60px;
  padding: 0 18px;
  border: 1px solid var(--site-toggle-border);
  border-radius: 16px;
  background: var(--site-toggle-bg);
  color: var(--site-toggle-text);
  box-shadow: var(--site-shadow-soft);
  font: inherit;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

body:not(.deals-page) .theme-toggle--header:hover {
  transform: translateY(-1px);
  border-color: var(--site-border-strong);
  box-shadow: var(--site-shadow-card);
}

body:not(.deals-page) .theme-toggle--header .theme-toggle__icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
  background: radial-gradient(circle at 30% 30%, #FFE8A3 0%, #F6D654 50%, #C68918 100%);
  box-shadow: 0 0 0 4px rgba(246, 214, 84, 0.16);
}

body:not(.deals-page)[data-theme="dark"] .theme-toggle--header .theme-toggle__icon {
  background: radial-gradient(circle at 35% 35%, #FFFFFF 0%, #D8E6FF 42%, #7AA2FF 100%);
  box-shadow: 0 0 0 4px rgba(122, 162, 255, 0.16);
}

body:not(.deals-page) .theme-toggle--header span:last-child {
  white-space: nowrap;
  font-size: 0.95rem;
  font-weight: 500;
}
.menu {
  display: grid;
  grid-template-rows: 64px;
  grid-auto-rows: 80px;
  border: 2px solid var(--main-color);
  border-radius: 16px;
  position: fixed;
  top: 36px;
  right: -405px;
  width: 400px;
  height: auto;
  background-color: var(--main-color);
  transition: right 0.3s ease;
  z-index: 9998;
}
.menu-title {
  width: 100%;
  height: 64px;
  color: var(--main-color);
  font-size: 24px;
}
.menu a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.959);
  padding: 0 24px;
  font-size: 32px;
}
.menu a:hover {
  text-decoration: none;
  box-sizing: border-box;
  color: var(--main-color);
  background-color: rgb(255, 255, 255);
  padding: 0 24px;
  transition: 0.05s;
}
.menu a:last-child:hover {
  border-bottom-right-radius: 16px;
  border-bottom-left-radius: 16px;
}
.menu.active {
  right: 24px;
}

/* Меню пользователя*/
.nav {
  display: flex;
  justify-content: center;
  max-width: 225px;
  height: 60px;
  color: #ffffff;
  z-index: 9997;
}

.nav [type="checkbox"] {
  position: absolute;
  left: -9999px;
}

.nav [type="checkbox"] + label {
  width: 225px;
  height: 60px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 18px;
  cursor: pointer;
  z-index: 1;
  background: var(--main-color);
  border-radius: 16px;
  transition: all 0.2s;
}

.nav-user-photo {
    width: 60px;
    height: 60px;

    display: flex;
    justify-content: center;
    align-items: center;


}

.nav-user-photo img {
    width: 50px;
    height: 50px;
    /* border: 1px solid var(--white); */
        border-radius: 12px;
    object-fit: cover;
}

.nav-user-name {
    width: 165px !important; 
    height: 60px;

    display: flex;
    justify-content: center;
    align-items: center;
}

.nav [type="checkbox"] + label:hover {
  background: var(--main-color);
}
.user-menu{
  list-style: none;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
.user-menu li {
  position: absolute;
  top: 45px;
  transform: translateX(-220px);
  transition: ease-in-out 0.5s;

  height: 50px;

  display: flex;
  justify-content: space-between;
}

.user-menu li:nth-child(1) {
  transition-delay: 0.2s;
}

.user-menu li:nth-child(2) {
  transition-delay: 0.15s;
}

.user-menu li a,
.user-menu li .user-menu-link {
  width: 215px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;

  background-color: var(--light-main-color);
  border-radius: 12px;

  color: inherit;
  text-decoration: none;
}

.user-menu li .user-menu-link--disabled {
  cursor: not-allowed;
  opacity: 0.58;
}
li .user-menu-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background-color: var(--main-color);
    display: flex;
    justify-content: center;
    align-items: center;
}

li .user-menu-icon img {
    width: 30px;
    height: 30px;
}

li .user-menu-text {
  width: 165px;
  height: 50px;

  display: flex;
  justify-content: center;
  align-items: center;
}
li .user-menu-text span{
  font-size: 18px;
  opacity: 0;
  transition: opacity 0.2s;
  color: var(--black);
  font-weight: bold;
  text-align: center;
}

/* .nav input:checked + label {
  transform: translateY(calc(-10% + 4px));
} */

.nav input:checked ~ .user-menu li:nth-child(1) {
  top: 110px;
  transition-delay: 0.2s;
}

.nav input:checked ~ .user-menu li:nth-child(2) {
  top: 170px;
  transition-delay: 0.1s;
}

.nav input:checked ~ .user-menu li a span {
  opacity: 1;
  transition-delay: 0.3s;
}

.log-button {
  width: 225px;
  height: 60px;

  display: flex;
  justify-content: center;
  align-items: center;

  background-color: var(--main-color);
  color: #ffffff;

  border-radius: 16px;
}
.log-button {
  width: 180px;

  display: flex;
  justify-content: center;
  align-items: center;

  text-decoration: none;
  text-align: center;

  font-size: 20px;
}

body:not(.deals-page)[data-theme="dark"] .menu-icon,
body:not(.deals-page)[data-theme="dark"] .calendar-icon {
  background-color: rgba(122, 162, 255, 0.14);
  border: 1px solid var(--site-border);
  box-shadow: var(--site-shadow-soft);
}

body:not(.deals-page)[data-theme="dark"] .lines,
body:not(.deals-page)[data-theme="dark"] .lines:before,
body:not(.deals-page)[data-theme="dark"] .lines:after {
  background: var(--site-text);
}

body:not(.deals-page)[data-theme="dark"] .menu {
  border-color: var(--site-border-strong);
  background-color: var(--site-menu-bg);
  box-shadow: var(--site-shadow-card);
}

body:not(.deals-page)[data-theme="dark"] .menu-title {
  color: var(--site-menu-text);
}

body:not(.deals-page)[data-theme="dark"] .menu a {
  color: var(--site-menu-text);
}

body:not(.deals-page)[data-theme="dark"] .menu a:hover {
  color: var(--site-menu-hover-text);
  background-color: var(--site-menu-hover-bg);
}

body:not(.deals-page)[data-theme="dark"] .nav [type="checkbox"] + label {
  background: var(--site-surface);
  border: 1px solid var(--site-border);
  color: var(--site-text);
  box-shadow: var(--site-shadow-soft);
}

body:not(.deals-page)[data-theme="dark"] .nav-user-name span {
  color: var(--site-text);
}

body:not(.deals-page)[data-theme="dark"] .user-menu li a,
body:not(.deals-page)[data-theme="dark"] .user-menu li .user-menu-link {
  background-color: var(--site-surface);
  border: 1px solid var(--site-border);
  box-shadow: var(--site-shadow-soft);
}

body:not(.deals-page)[data-theme="dark"] li .user-menu-icon {
  background-color: rgba(122, 162, 255, 0.16);
  border: 1px solid rgba(122, 162, 255, 0.2);
}

body:not(.deals-page)[data-theme="dark"] li .user-menu-text span {
  color: var(--site-text);
}

body:not(.deals-page)[data-theme="dark"] .log-button {
  background-color: var(--site-surface);
  color: var(--site-text);
  border: 1px solid var(--site-border);
  box-shadow: var(--site-shadow-soft);
}

/* Footer */
.footer {
  height: 50px;
  background-color: var(--main-color);
  color: #fff;
  text-align: center;
  padding: 20px 0 40px;
  font-size: 24px;
}

body:not(.deals-page)[data-theme="dark"] .footer {
  background-color: var(--site-footer-bg);
  color: var(--site-footer-text);
}

@media screen and (max-width: 980px) {
  body:not(.deals-page) .theme-toggle--header {
    min-width: 54px;
    padding: 0;
  }

  body:not(.deals-page) .theme-toggle--header span:last-child {
    display: none;
  }
}
