@charset "UTF-8"; *, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: Roboto, Arial, sans-serif;
    /* font-family: robotics; */
    font-size: 12pt;
    line-height: 1.5em;
    /* letter-spacing: -1px; */
}

/* div#mainWrap {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    position: absolute;
    top: 10px;
}

.resizer {
    height: 100vh;
    flex: 0 0 auto;
    width: 5px;
    background: #aaa;
    cursor: col-resize;
    user-select: none;
    transition: background 0.2s;
}

.resizer:hover, .resizer.dragging {
    background: #2196F3;
} */

/* .resizer::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2px;
    height: 40px;
    background: white;
    transform: translate(-50%, -50%);
    border-radius: 1px;
} */

ul, li, summary {
    list-style: none;
    /* list-style-type:none; */
}

.tree {
    list-style: none;
    padding-left: unset;
    /* font-family: monospace; */
    user-select: none;
    background-color: #3b3b3b;
    color: white;
}

.tree ul {
    padding-left: 15px;
    /* margin: 0; */
    position: relative;
}
.menu ul li::after{
    content: "";
    position:absolute;
    background-color: #ccc;
    width: 15px;
    height: 1px;
    left: -20px;
    top: 12px;
}

.menu ul li:hover::after{
    content: "";
    position:absolute;
    background-color: #565454;
    width: 15px;
    height: 1px;
    left: -20px;
    top: 12px;
}

.tree li {
    position: relative;
    margin: 0;
    /* padding: 4px 0 4px 20px; */
}

/* Вертикальная линия */
 .tree details li::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 1px;
  background: #b3afaf;
} 
/* Горизонтальная линия к узлу */
.tree li::after {
  content: "";
  position: absolute;
  top: 14px;
  left: 0;
  width: 10px;
  height: 1px;
  background: #b3afaf;
}
/* Убираем линию у последнего элемента */
.tree li:last-child::before {
  height: 14px;
}
/* Иконка сворачивания */
details > summary::before {
    content: "+";
    display: inline-block;
    width: 10px;
    margin-right: 10px;
    font-size: 1.2em;
    transition: transform 0.4s;
}

/* Иконка разворачивания */
details[open] > summary::before {
    content: "-";
    display: inline-block;
    width: 10px;
    /* margin-left: -20px; */
    font-size: 1.2em;
    transition: transform 0.4s;
}

/* details[open] > summary > .toggle::before {
  transform: rotate(90deg);
} */
/* Скрытие вложенных списков */
/* details:not([open]) > ul {
    display: none;
} */

div#leftPanel {
    background-color: #e8faf9;
    width: 600px;
    overflow-y: auto;
    /* height: auto; */
    padding: 8px 15px;
    flex: 1;
}

summary > span {
    font-weight: bold;
}

/* li:not(:has(ul))::before { display: none; } */
details {
    margin-bottom: 15px;
    margin-top: 5px;
}

/* .tree ul {
    margin-top: 5px;
    border-left: 2px solid #ccc;
} */

/* .tree ul {
    max-height: 0;
    overflow: hidden;
    border-left: 2px solid #ccc;
    margin-left: 12px;
    padding-left: 12px;
    transition: max-height 0.35s ease, opacity 0.35s ease;
    opacity: 0;
} */

li {
    display: block;
}

#page-market ul details > li {
    padding-left: 13px;
    padding-right: 13px;
}

.tree details li.dress-selected > span {
    font-weight: 700;
    color: #00fdff;
}

/* пунктир для услуг-цен */

.row {
    display: flex;
    gap: 5px;
    align-items:end
}

.row .separator {
    flex-grow: 1;
    border-bottom: 1px dotted white;
    margin-bottom: 0.5em;
    min-width: 10%;
}
.row .left {
    max-width: 60%;
}
.row .reight {
    max-width: 20%;
}

div#top-market {
    background-color: #bdd0e1;
    font-weight: 600;
    text-align: center;
}

div#top-market span b{
    color: #485c95
}

span.market-date {
    font-size: 0.9em;
    color: #485c95
}

span.master {
    font-size: 0.9em;
}

#page-market #top-market span.service {
    display:inline-block;
}

div#contact-market {
    /* max-width: 100%; */
}

/* Прокрутка списка услуг: страница — колонка фикс. высоты, скроллится только .tree */
#page-market.page-active {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 4.3em - var(--tabs-h));
    overflow: hidden;
}
#page-market #top-market {
    flex: 0 0 auto;
}
#page-market .tree {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Информационная иконка описания услуги */
.svc-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 6px;
    border-radius: 50%;
    border: 1px solid #00fdff;
    color: #00fdff;
    font-size: 11px;
    font-style: italic;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    vertical-align: middle;
    flex: 0 0 auto;
}
.svc-info:hover { background: #00fdff; color: #3b3b3b; }

/* Модальное окно описания услуги */
.svc-desc-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    padding: 16px;
}
.svc-desc-modal {
    background: #3b3b3b;
    color: #fff;
    border-radius: 10px;
    max-width: 420px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 16px 18px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
.svc-desc-title {
    font-weight: 700;
    font-size: 1.05em;
    color: #00fdff;
    margin-bottom: 10px;
}
.svc-desc-body {
    font-size: 0.95em;
    line-height: 1.45;
    white-space: pre-wrap;
}
.svc-desc-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}
.svc-desc-close {
    padding: 8px 18px;
    font-size: 0.95em;
    color: #3b3b3b;
    background: #00fdff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}
.svc-desc-close:hover { filter: brightness(1.1); }

@media (min-width: 768px) {
    #page-market {
        padding: 16px;
    }
    .tree {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0 24px;
        align-items: start;
    }
}

@media (min-width: 1024px) {
    .tree {
        grid-template-columns: repeat(3, 1fr);
    }
}
