/* Import your application global css files here or add the styles directly to this file */

html {
  --lumo-box-shadow-s: 0 1px 1px 0 rgba(27, 14, 14, 0.14), 0.5px 0.5px 0px 0 rgba(0, 0, 0, 0), 0px 0px 0.5px 0.5px rgba(0, 0, 0, 0.1);
  --lumo-primary-text-color: #000;
  --lumo-secondary-text-color: #000;
  --lumo-primary-color: var(--lumo-primary-text-color);
  --lumo-success-color: var(--vb-success-color);
  --lumo-primary-color-10pct: rgba(238, 255, 117, 0.13);

  --vb-highlight-color: var(--lumo-primary-color);
  --vb-success-color: #009600;
  --vb-price-color: var(--lumo-primary-text-color);
  --vb-slider_bgcolor: var(--vb-app-layout-drawer-background);
  --vb-pagination-color: #28a3eb;
  --vb-pagination_hover-color: #2986ff;
  --vb-spacing: 1rem;
  --vb-spacing2x: 2rem;
  --vb-view-border: transparent;
  --vb-slide-track-border: transparent;

  --vb-app-layout-navbar-background: #f8f8f8;
  --vb-app-layout-navbar-box-shadow: var(--lumo-box-shadow-s);
  --vb-app-layout-drawer-background: #e2e2e2;
  --vb-app-layout-drawer-width: 12rem;
  --vb-slide-thumb-opacity: 0.7;
}

[theme~="dark"] {
  --lumo-primary-text-color: rgb(255, 255, 255);
  --lumo-base-color: rgb(30, 30, 30);

  --vb-highlight-color: yellow;
  --vb-price-color: var(--lumo-primary-text-color);
  --vb-slider_bgcolor: var(--vb-app-layout-drawer-background);
  --vb-app-layout-navbar-background: var(--lumo-contrast-10pct);
  --vb-app-layout-navbar-box-shadow: var(--lumo-box-shadow-s);
  --vb-app-layout-drawer-background: #2a2b2d;
  --vb-slide-thumb-opacity: 0.5;

  vaadin-login-overlay::part(brand) {
    background-color: var(--lumo-contrast-10pct);
  }
}

a {
  font-weight: bold;
}

body {
  overflow-x: hidden;
}

vaadin-app-layout::part(drawer) {
  padding-top: 0.5rem;
  /* width: unset; */
  /* width: var(--vb-app-layout-drawer-width); */
  background-color: var(--vb-app-layout-drawer-background);
  box-shadow: var(--vb-app-layout-navbar-box-shadow);
}
vaadin-app-layout::part(navbar) {
  background-color: var(--vb-app-layout-navbar-background);
  box-shadow: var(--vb-app-layout-navbar-box-shadow);
}

vaadin-side-nav {
  line-height: 2rem;
  font-size: var(--lumo-font-size-s);
  font-weight: unset;
  color: var(--lumo-secondary-text-color);
  padding-left: var(--lumo-space-s);
}
vaadin-side-nav-item::part(content) {
  /* color: unset; */
  background-color: unset;
}
vaadin-side-nav-item[current]::part(content) {
  font-weight: bold;
}
vaadin-side-nav-item::part(link) {
  gap: 0;
}

@keyframes vmark__fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.vmark__app-logo {
  display: inherit;
}

.vmark__navipathlayout {
  padding: 1rem;
  gap: 0.3rem;
}
.vmark__navipathlayout [router-link]:hover {
  color: var(--vb-highlight-color);
  text-decoration: none;
}

.vmark__item-short-desc {
  cursor: pointer;
}
.vmark__item-short-desc:hover {
  color: var(--vb-highlight-color);
}

.vmark__desc {
  flex: 1;
  min-width: min(100%, 200px);
  max-width: 700px;
  padding: var(--vb-spacing2x);
  padding-top: var(--vb-spacing);
}

.vmark__element-view {
  padding-top: 0;
  padding-bottom: 0;
}

.vmark__items-grid {
  display: grid;
  grid-auto-flow: row;
  gap: var(--vb-spacing2x);
  padding-top: 1rem;
  padding-bottom: 1rem;
  width: 100%;
}

.vmark__items-flex {
  display: flex;
  flex-direction: row;
  align-items: start;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
  height: 100%;
}

vaadin-login-overlay.vmark__login_logoHide::part(brand) {
  display: none;
}
vaadin-login-overlay.vmark__login_logoShow::part(brand) {
  align-items: center;
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}
.vmark__login_formHide vaadin-login-form-wrapper vaadin-text-field,
.vmark__login_formHide vaadin-login-form-wrapper vaadin-password-field,
.vmark__login_formHide vaadin-login-form vaadin-button[theme~="submit"] {
  display: none;
}

.vmark__login_form-title::part(form-title) {
  margin-top: 0;
  align-self: center;
}

.vmark__app-navbar {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  width: 100%;
}
.vmark__app-order-nav {
  gap: 0.3rem;
}

.vmark__t-container {
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}
.vmark__hat-section {
  margin: 0.5rem auto 1rem;
  text-align: center;
  font-size: var(--lumo-font-size-l);
}
.vmark__i-section {
  display: flex;
  justify-content: center; /* center all group */
  flex-wrap: nowrap;
  gap: 1.5rem; /* space between elements */
}
.vmark__i-item-section {
  flex: 0 0 auto;
  text-align: center;
  box-sizing: border-box;
  color-scheme: light; /* for google sign-in button weird paddings */
}

/* ------------ moderate button ------------ */
.vmark__moderate-btn {
  position: absolute;
  backdrop-filter: blur(10px) contrast(0.1);
  cursor: pointer;
  padding: 5px;
  /* border-radius: 50%; */
  opacity: 0.8;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.vmark__moderate-btn:hover {
  opacity: 1;
  background-color: rgba(0, 0, 0, 0.05);
  transform: scale(1.1);
}
.vmark__moderate-btn svg {
  width: 24px;
  height: 24px;
  fill: #fff;
}
/* ------------ moderate button ------------ */

/* ----- fullscreen open/close buttons ----- */
.vmark__fullscreen-open-btn {
  top: 1px;
  right: 1px;
}
:fullscreen .vmark__fullscreen-open-btn {
  display: none;
}

.vmark__fullscreen-close-btn {
  display: none;
  top: 1px;
  right: 1px;
}

.vmark__fullscreen-info-btn {
  display: none;
  top: 50px;
  right: 1px;
  background-color: var(--vb-pagination-color);
}
.vmark__fullscreen-info-btn:hover {
  background-color: var(--vb-pagination-color);
}

.vmark__fullscreen-target:fullscreen .vmark__fullscreen-close-btn,
.vmark__fullscreen-target:fullscreen .vmark__fullscreen-info-btn {
  display: flex;
}
/* ----- fullscreen open/close buttons ----- */

/* ------- fullscreen modal 'Popover' ------ */
.vmark__fullscreen-popover {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  animation: vmark__fadeIn 0.3s ease;
  z-index: 1000;
}

.vmark__fullscreen-popover-content {
  background-color: #fff;
  color: #000;
  border-radius: 12px;
  padding: 24px;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow-y: hidden; /* Changed from auto to hidden to prevent scrolling the entire content (including close button) */
  position: relative;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  font-size: var(--lumo-font-size-m);
  line-height: 1.6;
}

/* New inner container for the scrollable description */
.vmark__fullscreen-popover-inner {
  overflow-y: auto; /* Scroll only the inner content */
  max-height: calc(80vh - 58px); /* Adjust for padding (24px top + 24px bottom = 48px) and approximate close button space (10px buffer to avoid overlap) */
  /* No additional padding needed here, as it's inherited or set on parent */
}

/* The close button remains absolute positioned relative to the content container */
.vmark__fullscreen-popover-close {
  position: absolute;
  top: 5px;
  right: 5px;
  cursor: pointer;
  padding: 5px;
  opacity: 0.6;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vmark__fullscreen-popover-close:hover {
  opacity: 1;
  background-color: rgba(0, 0, 0, 0.05);
  border-radius: 50%;
}
.vmark__fullscreen-popover-close svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}
/* ------- fullscreen modal 'Popover' ------ */

/* Контейнер, который будет разворачиваться */
.vmark__fullscreen-target {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background-color: transparent; /* В обычном режиме фон прозрачный */
}

/* Стили в режиме Fullscreen */
.vmark__fullscreen-target.is-fullscreen {
  background-color: var(--vb-slider_bgcolor);
  /* Убираем лишние отступы, чтобы фон был сплошным */
  padding: 0;
  margin: 0;
  /* Гарантируем, что контейнер занимает всю высоту */
  height: 100vh;
  /* Flexbox для позиционирования */
  display: flex;
  flex-direction: column;
}
