﻿

/* =========================================================
    GLOBAL RESETS
========================================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    font-family: var(--font-family);
}

body {
    margin: 0;
    font-family: "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.45;
    background: var(--bg-color) !important;
    color: var(--gray-800);
    font-size: var(--font-size-base); /*calc(var(--index) * .65)*/
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: 600;
}

.eBlind {
    & h1, 
    & h2, 
    & h3, 
    & h4, 
    & h5, 
    & h6 {
        margin: 0;
        font-weight: 900 !important;
        color: green !important;
    }
}

p {
    margin: 0;
}

a {
    color: var(--brand-600)!important;
    text-decoration: none;
}

button {
    font-family: inherit;
}

.content-wrapper {
    flex: 1 1 0;
    height: 100vh;
    overflow-y: auto;
    padding: var(--spacing-md) var(--spacing-2xl) var(--spacing-md) var(--spacing-2xl);
    display: flex;
    flex-direction: column;
}


/* Overlay that creates the blur effect */
#blurOverlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    backdrop-filter: blur(5px);
    z-index: 9998;  /*just behind the loader */
    display: none;
}

.admin {
    display: flex;
    min-height: 100vh;
    overflow: hidden; /* Sidebar stays fixed; content scrolls */
    height: 100%;
}

.--eMargin {
    margin: var(--eMarginTop, 0) var(--eMarginRight, 0) var(--eMarginBottom, 0) var(--eMarginLeft, 0);
}

.portal__menu {
    /*max-height: calc(100vh - 544px);*/
    height: fit-content; /*100%*/
    overflow: auto;
    padding: 0;
}

.--eFlex {
    display: flex;
    justify-content: var(--eFlexJC, space-between);
    align-items: center;
    gap: var(--eFlexGap, var(--spacing-xs));
}

.--eGrid {
    display: grid;
    gap: var(--eGridGap, 12px);
}

.visually-hidden {
    position: absolute !important;
    width: 1px; 
    height: 1px;
    margin: -1px; 
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0); 
    clip-path: inset(50%); 
    white-space: nowrap; 
}

.--eEllipsis {
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
}

.font-regular {
    font-weight: var(--font-weight-regular);
}

.font-medium {
    font-weight: var(--font-weight-medium);
}

.font-semibold {
    font-weight: var(--font-weight-semibold);
}

.font-bold {
    font-weight: var(--font-weight-bold);
}

/* === Letter Spacing Helpers === */
.letter-normal {
    letter-spacing: normal;
}

.letter-tight {
    letter-spacing: -0.02em;
}

.letter-loose {
    letter-spacing: 0.05em;
}


.skeleton {
    min-height: 64px;
    background: var(--gray-100);
}

/*html {
    scrollbar-gutter: stable both-edges;
}*/

/* MultiSelect hide remove buttons */
.e-multiselect-no-remove .k-input-values .k-select {
    display: none !important;
}

/*.bg__img:has( .thumb[src$=".svg"]) {
    background: radial-gradient(circle, var(--white) 0%, var(--brand-150) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: var(--radius-md);
}*/

.thumb {
    border-radius: var(--radius-md);
    object-fit: cover;
    object-position: center;

    &[src$=".svg"] {
        object-fit: none;
    }
}

.eView {
    & .thumb {
        width: 100%;
        height: 200px;
    }
}

/*Scroll start*/
:root {
    --sb-thumb: rgba(0,0,0,.25);
    --sb-thumb-hover: rgba(0,0,0,.45);
}

/* В Chrome/Edge/Safari */
*::-webkit-scrollbar {
    width: 8px; /* fixed zone - no layout shifts */
    height: 8px;
    background: transparent; /* The track is transparent and looks like an overlay. */
    position: absolute;
    z-index: 3;
}

*::-webkit-scrollbar-thumb {
    background: var(--sb-thumb);
    border-radius: 999px;
    /* "Thin" look thanks to the transparent frame (the clickable area remains 8px) */
    border: 4px solid transparent;
    background-clip: padding-box;
    transition: border-width .15s ease, background-color .15s ease, opacity .15s ease;
}

/* Hover exactly on the slider (without sticking) */
*::-webkit-scrollbar-thumb:hover {
    border-width: 1px; /* visually thicker */
    background-color: var(--sb-thumb-hover);
    cursor: pointer;
}

/* (optional) reaction if the cursor is over the track - also thicken */
*::-webkit-scrollbar:hover {
    /* don't change anything in the size of the zone (to avoid displacements) */
}

*::-webkit-scrollbar:hover *::-webkit-scrollbar-thumb { /* just in case for nested */
    border-width: 4px;
}

/* Active — при перетаскивании */
*::-webkit-scrollbar-thumb:active {
    background-color: rgba(0,0,0,.6);
}

/* Active - when dragging */
/** {
    scrollbar-width: thin;*/ /* тонкий по умолчанию */
    /*scrollbar-color: var(--sb-thumb) transparent;*/ /* цвет/трек */
/*}*/

/* «Расширение» на ховере в FF без анимации: */
/** :hover {
    scrollbar-width: auto;
}*/

.--eNav > section {
    overflow: auto;
}

.--eNav > section .portal__menu {
    overflow: hidden;
} 

.--eNav > section::-webkit-scrollbar {
    width: 0;
}


/*Scroll end*/
.mood__edit-page {
    font-size: var(--font-size-text-xs);
    border: 1px solid var(--brand-800);
    background-color: var(--brand-100);
    color: var(--brand-800);
    padding: 3px 10px;
    border-radius: 16px;
    height: 24px;
    position: relative;
    top: -4px;
}

/* "You see this page as <Role>" inline label rendered at the top of the
   menu footer (just below the divider strip, above the user-name row).
   Only rendered when the user has 2+ distinct roles in the current
   association — the single-role majority never sees this. The role name
   itself is the interactive element (bold); the surrounding sentence is
   kept faint so the whole control stays unobtrusive. */
.portal-menu-role-as {
    font-size: 11px;
    color: var(--gray-500, #6b7280);
    padding: 6px 12px 8px;
    line-height: 1.4;
    position: relative;
    text-align: center;
}
.role-as__name--switchable {
    cursor: pointer;
    user-select: none;
    color: var(--gray-900, #111827);
    white-space: nowrap;
}
.role-as__name--switchable strong {
    border-bottom: 1px dotted currentColor;
    color: var(--brand-600);
}
.role-as__name--static {
    white-space: nowrap;
}
.role-as__name--static strong {
    color: var(--gray-900, #111827);
}
.role-as__arrow {
    font-size: 9px;
    margin-left: 2px;
}
/* The label lives in the menu footer, so the dropdown must open UPWARD —
   anchor to the bottom of the label and align horizontally to the centre. */
.role-as__menu {
    position: absolute;
    z-index: 100;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin: 0 0 4px 0;
    background: #fff;
    border: 1px solid var(--gray-200, #e5e7eb);
    box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
    border-radius: 4px;
    padding: 4px 0;
    list-style: none;
    min-width: 160px;
    text-align: left;
}
.role-as__menu li {
    margin: 0;
}
.role-as__menu li a {
    display: block;
    padding: 6px 12px;
    text-decoration: none;
    color: var(--gray-900, #111827);
    font-size: 12px;
    white-space: nowrap;
}
.role-as__menu li a:hover {
    background: var(--gray-100, #f3f4f6);
}

