@import url("https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap");

:root {
    --primary-color: rgb(49, 115, 243);
    --light-color: rgba(246, 247, 249, 1);
    --grey-color: rgba(192, 192, 192, 1);
    --bg-color-main: #181A1F;
    --bg-color-card: #202630;
    /* Цвет карточек */
    --bg-color-gradient-primary: linear-gradient(180.00deg, rgb(26, 24, 30), rgb(39, 37, 44) 100%);
    --bg-color-gradient-second: linear-gradient(180.00deg, rgb(254, 191, 86), rgb(152, 114, 51) 100%);
    --bg-color-btn: #FFCC02;
    --on-surface: #E1E1E1;
    /* Текст */
    --on-surface-variant: #B2B2B2;
    --container: rgba(255, 255, 255, 0.05);
    --container-high: #2F2D31;
    --container-low: #202630;
    --on-primary: #332F1F;

    --on-surface-variant-2: #EAECEF;

    --outline: #302F34;
    --outline-variant: #48464B;
}

/* Обновляем стили для html */
html {
    position: fixed;
    height: 100%;
    overflow: hidden;
    width: 100%;
}

/* Обновляем стили для body */
body {
    background: var(--bg-color-main);
    max-width: 400px;
    font-weight: 600;
    font-family: "Inter", sans-serif;
    font-size: 14px;
    margin: 0 auto;
    box-sizing: border-box;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* для плавного скролла на iOS */
    position: relative;
    padding-bottom: 80px;

    /* Убираем скроллбары */
    -ms-overflow-style: none;
    scrollbar-width: none;
}

body::-webkit-scrollbar {
    display: none;
    width: 0;
}

a {
    text-decoration: none;
    color: currentColor;
    cursor: pointer;
}

ul {
    list-style: none;
    padding-left: 0;
}

input {
    border: none;
    background-color: var(--light-color);
    color: rgba(138, 138, 138, 1);
    width: 100%;
    border-radius: 10px;
    padding: 11px 18px;
}

input:focus {
    outline: none;
}

/* Заменим существующий стиль для button */
button {
    /* Сброс к дефолтным значениям */
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    line-height: normal;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
}

/* Оставим только стиль для отключенной кнопки */
button:disabled {
    background: #383640;
    cursor: not-allowed;
    color: var(--on-surface);
}

/* Основной контейнер */
.container {
    padding: 0 16px;
    padding-top: 12px;
    margin: 0 auto;
    width: calc(100% - 32px);
}

/* Сетка */
.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    width: 100%;
}

/* Элементы на всю ширину */
.grid-full {
    grid-column: 1 / -1;
}

/* Элементы на 2 колонки */
.grid-half {
    grid-column: span 2;
}

/* Элементы на 3 колонки */
.grid-three {
    grid-column: span 3;
}

/* Элемент на 1 колонку */
.grid-quarter {
    grid-column: span 1;
}

.loading {
    background-color: #181A1F;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 100vh;
    align-items: center;
    justify-items: center;
    z-index: 999999;
}

.block-center {
    display: grid;
    justify-content: center;
    justify-items: center;
}

.active {
    color: var(--primary-color);
}

.mt-19 {
    margin-top: 19px;
}

.mt-14 {
    margin-top: 14px;
}

.mt-42 {
    margin-top: 42px;
}

.mt-17 {
    margin-top: 17px;
}

.mt-6 {
    margin-top: 6px;
}

.mt-31 {
    margin-top: 10px;
}

summary {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

summary::after {
    content: url(../../images/app/plus.svg);
}

summary > span {
    border-bottom: 1px dashed var(--primary-color);
    color: var(--primary-color);
}

details {
    padding: 15px 21px 17px 19px;
    background: var(--light-color);
    border-radius: 10px;
    margin-bottom: 13px;
}

details > p {
    margin-top: 13px;
    font-weight: 300;
    font-size: 11px;
}

details[open] > summary:after {
    content: url(../../images/app/minus.svg);
}

.input-control > input.fio {
    width: 100%;
    font-size: 13px;
    border-radius: 10px;
}

.section-stretcher {
    padding-bottom: 250px;
}

/* Обновляем стили для основных контейнеров */
main.container {
    height: calc(100% - 12px);
    display: flex;
    flex-direction: column;
}

/* Сетка */
main.container > .grid {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    overflow-y: auto;
}

/* Стили для страниц (sections) */
.page {
    display: none;
    height: 100%;
    overflow-y: auto;
    flex: 1;
}

/* Показываем активную страницу */
.page.active {
    display: flex;
    flex-direction: column;
}

/* Специфичные стили для страницы истории */
.page-history {
    display: flex;
    flex-direction: column;
}

.page-history .container_center_block {
    flex: 1;
    display: flex;
    flex-direction: column;

    height: 92%;
}

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

.page-history .grid {
    flex: 1;
}

.page-history .history {
    flex: 1;
    overflow-y: auto;
}

.empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--on-surface-variant);
    font-size: 12px;
    font-weight: 400;
    text-align: center;
    min-height: 48px;
}
