.questions-table {
    display: flex;
    flex-direction: column;
    margin-top: 1rem;

    width: 100%;
}

.questions-header,
.question-row {
    display: flex;
    align-items: center;
    width: 100%;
}

.questions-header {
    padding: 0.6rem 0;
}

.question-row {
    padding: 0.25rem 0;
}

.questions-header {
    font-weight: 600;
    border-bottom: 1px solid #ececec;
}

.question-row {
    height: 3.85rem;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #ececec;
}

.questions-table > .question-row:last-child {
    border-bottom: none;
}

.question-row .col-themes,
.question-row .col-companies {
    align-items: center;
    align-content: center;
}

.col-id {
    width: 5%;
    text-align: center;
}

.col-name {
    width: 25%;
    line-height: 1.2;
}

.col-themes,
.col-companies {
    width: 35%;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    align-items: center;
    padding: 0 0.3rem;
}

/* сами чипы */
.chip {
    background: #e0e0e0;    /* светло-серый фон */
    border-radius: 8px;      /* единый радиус управляющих плашек */
    padding: 0.14rem 0.5rem;  /* компактнее, чтобы строки были как в сезонном рейтинге */
    font-size: 0.8rem;
    line-height: 1.15;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;     /* текст не переносится внутри чипа */
}

.questions-pagination-bar {
    position: relative;
    margin-top: 1.25rem;

    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
}

.questions-pagination-bar .month-pagination {
    grid-column: 2;
    margin-top: 0;
}

.questions-page-size {
    position: relative;
    grid-column: 3;
    justify-self: end;
}

.questions-page-size__pill {
    border: none;
    background: #f4f4f4;
    border-radius: 12px;
    padding: 0.55rem 0.9rem;

    cursor: pointer;

    display: inline-flex;
    align-items: center;
    gap: 0.15rem;

    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
}

.questions-page-size__pill:focus,
.questions-page-size__pill:focus-visible {
    outline: none;
    box-shadow: none;
}

.questions-page-size__pill .label {
    color: #737474;
    font-weight: 650;
}

.questions-page-size__pill .value {
    min-width: 1.25rem;
    text-align: center;
    font-weight: 700;
    color: #737474;
}

.questions-page-size__pill .chev {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 1rem;
    height: 1rem;
    flex: 0 0 1rem;

    color: #6b7280;
    font-size: 0.85rem;
    font-weight: 900;
    line-height: 1;

    transform: rotate(0deg);
    transition: transform 0.18s ease;
}

.questions-page-size.is-open .questions-page-size__pill .chev {
    transform: rotate(-180deg);
}

.questions-page-size__dropdown {
    position: absolute;
    top: auto;
    bottom: calc(100% + 10px);
    right: 0;

    min-width: 150px;

    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);

    padding: 0.5rem;
    z-index: 200;

    transform-origin: bottom right;
}

.questions-page-size__dropdown.hidden {
    display: none;
}

.questions-page-size__item {
    width: 100%;
    border: none;
    background: transparent;

    padding: 0.55rem 0.7rem;
    border-radius: 10px;

    cursor: pointer;
    text-align: left;
    white-space: nowrap;

    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 650;
}

.questions-page-size__item:hover {
    background: #f3f4f6;
}

.questions-page-size__item.active {
    background: #eff6ff;
    color: #2563eb;
}

.month-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

@media (max-width: 630px) {
    .questions-pagination-bar {
        grid-template-columns: 1fr;
        gap: 0.9rem;
    }

    .questions-pagination-bar .month-pagination {
        grid-column: 1;
        grid-row: 1;
    }

    .questions-page-size {
        grid-column: 1;
        grid-row: 2;
        justify-self: end;
    }
}

.page-btn {
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 12px;
    border: none;
    background: #f4f4f4;
    color: #9e9e9e;
    cursor: pointer;
    font-weight: 900;
}

.page-btn:disabled {
    opacity: 0.50;
    cursor: default;
}

.page-info {
    height: 2.2rem;
    padding: 6px 14px;
    border-radius: 12px;
    background: #f4f4f4;
    font-weight: 600;
}

.page-info,
.page-info span {
     color: #737474;
}

.page-info--jumpable {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;

    min-width: 4.6rem;
    cursor: text;

    transition:
        background-color 0.15s ease,
        box-shadow 0.15s ease;
}

.page-info--jumpable:hover {
    background-color: none;
    box-shadow: none;
}

.page-jump-current {
    min-width: 1ch;
    text-align: right;
}

.page-jump-input {
    width: 2.4rem;
    height: 1.55rem;

    padding: 0 0.25rem;

    border: none;
    border-radius: 7px;
    background-color: #ffffff;

    color: #333333;
    font-family: inherit;
    font-size: inherit;
    font-weight: 700;
    text-align: center;

    caret-color: auto;
}

.page-jump-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.page-jump-input.hidden {
    display: none;
}

.page-jump-separator,
.page-jump-total {
    pointer-events: none;
}

.page-jump-current.hidden,
.page-jump-input.hidden {
    display: none;
}

@media (max-width: 390px) {
    .page-info--jumpable {
        min-width: 4.2rem;
        padding-left: 10px;
        padding-right: 10px;
    }

    .page-jump-input {
        width: 2rem;
    }
}

.month-empty {
    margin-top: 1rem;
    padding: 0.75rem 0.5rem;
    color: #6b7280;
    font-size: 0.95rem;
}

/* ===== RESPONSIVE PASS: readable question rows on phones ===== */
@media (max-width: 600px) {
    .questions-header {
        display: none;
    }

    .question-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 0.45rem;
        height: auto;
        min-height: 0;
        padding: 0.8rem;
        align-items: start;
    }

    .questions-table--auth .question-row {
        grid-template-columns: 1.25rem minmax(0, 1fr);
        column-gap: 0.55rem;
    }

    .questions-table .question-row .col-id {
        display: none;
    }

    .questions-table .question-row .col-name,
    .questions-table .question-row .col-companies,
    .questions-table .question-row .col-themes {
        width: auto;
        min-width: 0;
        flex: none;
        justify-content: flex-start;
        text-align: left;
        padding: 0;
    }

    .questions-table:not(.questions-table--auth) .question-row .col-name,
    .questions-table:not(.questions-table--auth) .question-row .col-companies,
    .questions-table:not(.questions-table--auth) .question-row .col-themes {
        grid-column: 1;
    }

    .questions-table--auth .question-row .col-status {
        grid-column: 1;
        grid-row: 1;
        width: 1.25rem;
        margin: 0;
        align-self: start;
        padding-top: 0.1rem;
    }

    .questions-table--auth .question-row .col-name,
    .questions-table--auth .question-row .col-companies,
    .questions-table--auth .question-row .col-themes {
        grid-column: 2;
    }

    .question-row .col-name {
        font-weight: 600;
        line-height: 1.35;
        overflow-wrap: anywhere;
    }

    .question-row .chip {
        max-width: 100%;
        white-space: normal;
        overflow-wrap: anywhere;
        text-align: left;
    }

    .month-pagination {
        gap: 0.4rem;
    }

    .page-btn {
        width: 2rem;
        height: 2rem;
    }
}

