/* /mentor/current — merged activity (plan mentor-activity-ui-v4). Prefix mac- */

.mac-page-wrap {
    max-width: 1100px;
    margin: 0 auto;
}

.mac-page-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary-color, #1446a0);
    margin-bottom: 0.75rem;
}

.mac-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.5rem 0.75rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color, #dfdfdf);
    border-radius: 8px;
    background: var(--bs-light, #fafafa);
    margin-bottom: 1rem;
    overflow: visible;
    min-width: 0;
}

.mac-toolbar--placeholder {
    align-items: center;
}

.mac-toolbar-filters {
    align-items: flex-end;
}

.mac-field {
    flex: 0 1 auto;
    min-width: 0;
}

.mac-field-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--bs-secondary-color, #5c5c5c);
    margin-bottom: 0.15rem;
}

.mac-field--student .mac-field-control {
    min-width: 160px;
    max-width: 280px;
}

.mac-field--types {
    flex: 0 0 auto;
    align-self: flex-end;
    min-width: 0;
    max-width: 100%;
}

/* Event types: compact dropdown; toggle looks like a small text field */
.mac-type-dropdown.dropdown {
    flex: 0 0 auto;
    width: auto;
    max-width: 100%;
}

.mac-type-dropdown .mac-type-dropdown-toggle.dropdown-toggle {
    width: max-content;
    max-width: min(260px, 100%);
    min-width: 0;
    text-align: left;
    font-weight: 400;
    line-height: 1.5;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    padding-left: 0.5rem;
    padding-right: 2rem;
    /* Input-like field, not a filled button (override btn-secondary) */
    --bs-btn-color: var(--bs-body-color, #212529);
    --bs-btn-bg: var(--bs-body-bg, #fff);
    --bs-btn-border-color: var(--bs-border-color, #ced4da);
    --bs-btn-hover-color: var(--bs-body-color, #212529);
    --bs-btn-hover-bg: var(--bs-body-bg, #fff);
    --bs-btn-hover-border-color: var(--bs-border-color, #ced4da);
    --bs-btn-focus-shadow-rgb: 13, 110, 253;
    --bs-btn-active-color: var(--bs-body-color, #212529);
    --bs-btn-active-bg: var(--bs-body-bg, #fff);
    --bs-btn-active-border-color: var(--bs-border-color, #ced4da);
    background-color: var(--bs-body-bg, #fff);
    border: 1px solid var(--bs-border-color, #ced4da);
    color: var(--bs-body-color, #212529);
    border-radius: var(--bs-border-radius, 0.25rem);
    box-shadow: none;
}

.mac-type-dropdown .mac-type-dropdown-toggle.dropdown-toggle:hover,
.mac-type-dropdown .mac-type-dropdown-toggle.dropdown-toggle:focus,
.mac-type-dropdown .mac-type-dropdown-toggle.dropdown-toggle:active,
.mac-type-dropdown.show .mac-type-dropdown-toggle.dropdown-toggle {
    background-color: var(--bs-body-bg, #fff);
    border-color: var(--bs-border-color, #ced4da);
    color: var(--bs-body-color, #212529);
    box-shadow: none;
}

.mac-type-dropdown .mac-type-dropdown-toggle.dropdown-toggle:focus {
    border-color: var(--bs-primary, #86b7fe);
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.mac-type-dropdown .dropdown-menu {
    min-width: 0;
    width: max-content;
    max-width: min(320px, 100vw - 1.5rem);
    padding: 0.35rem 0;
    margin-top: 0.125rem;
    overflow: visible;
}

.mac-type-dropdown-item-checklist {
    cursor: default;
    overflow: visible;
}

.mac-type-dropdown-item-checklist:hover,
.mac-type-dropdown-item-checklist:active,
.mac-type-dropdown-item-checklist:focus {
    background-color: transparent;
    color: inherit;
}

.mac-type-dropdown-checklist-inner {
    max-height: 260px;
    overflow-x: visible;
    overflow-y: auto;
    padding: 0.2rem 0.65rem 0.35rem 0.5rem;
}

.mac-type-checklist {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.mac-type-checklist .form-check {
    margin-bottom: 0;
    padding-left: 1.5em;
    overflow: visible;
}

.mac-type-checklist .form-check .form-check-input {
    margin-left: -1.5em;
}

.mac-field--date {
    flex: 0 0 auto;
}

.mac-date-input {
    min-width: 118px;
    max-width: 140px;
}

.mac-field--apply {
    flex: 0 0 auto;
    margin-left: auto;
}

.mac-export-links-row {
    gap: 0.2rem;
    min-height: 1.1rem;
    width: fit-content;
}

.mac-export-link {
    display: inline-flex;
    justify-content: center;
    min-width: 2rem;
    padding-left: 0.1rem;
    padding-right: 0.1rem;
    text-decoration: none;
    white-space: nowrap;
}

.mac-applied-period {
    line-height: 1.35;
}

.mac-feed-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    flex-wrap: wrap;
}

.mac-feed-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.25rem;
    flex-wrap: wrap;
    margin-left: auto;
}

/* One strip inside #mentor-current-feed-pagination; display:contents keeps flex layout */
.mac-feed-pagination-inner {
    display: contents;
}

.mac-feed-page-btn {
    min-width: 1.55rem;
    padding: 0.12rem 0.32rem;
    line-height: 1.2;
}

.mac-feed-page-ellipsis {
    padding: 0 0.2rem;
}

.mac-toolbar-label {
    font-weight: 600;
    font-size: 0.95rem;
}

.mac-toolbar-hint {
    font-size: 0.85rem;
}

.mac-feed-wrap {
    min-height: 120px;
    border: 1px solid var(--border-color, #dfdfdf);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    background: var(--bs-body-bg, #fff);
}

.mac-feed-loading {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.mac-feed-empty-text {
    color: var(--bs-secondary-color, #5c5c5c);
    font-size: 0.95rem;
}

.mac-feed-item-row {
    font-size: 0.9rem;
}

.mac-feed-item-badge {
    font-family: ui-monospace, monospace;
    font-size: 0.8rem;
    color: var(--primary-color, #1446a0);
}

.mac-feed-error {
    padding: 0.5rem 0;
}

.mac-status-message {
    margin-top: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    background: var(--bs-light, #f8f9fa);
    font-size: 0.9rem;
}

.mac-access-denied {
    max-width: 560px;
    margin: 2rem auto;
}

/* Feed list: vertical rhythm (spec §4.9) */
.mac-feed {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mac-item {
    border: 1px solid var(--border-color, #dfdfdf);
    border-radius: 8px;
    padding: 0.5rem 0.65rem;
    background: var(--bs-body-bg, #fff);
}

.mac-item--journal {
    background: #f4f8ff;
}

.mac-item--domain {
    background: #f7f7f7;
}

/* Domain rows: compact timeline entries (spec §4.6, prototype mac-source-domain) */
.mac-item--compact.mac-source-domain {
    padding: 0;
    overflow: hidden;
}

.mac-domain-compact {
    padding: 0.5rem 0.65rem;
    gap: 0.35rem 0.6rem;
}

.mac-domain-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.45rem;
    border-radius: 4px;
    color: #fff;
    flex: 0 0 auto;
    align-self: flex-start;
}

.mac-domain-badge--submitted {
    background: #036d19;
}

.mac-domain-badge--reviewed {
    background: #1565c0;
}

.mac-domain-compact-text {
    flex: 1 1 200px;
    min-width: 0;
}

.mac-domain-compact-time {
    font-size: 0.8rem;
    white-space: nowrap;
    margin-left: auto;
}

.mac-domain-student-link {
    font-weight: 600;
    text-decoration: none;
    color: var(--primary-color, #1446a0);
}

.mac-domain-student-link:hover {
    text-decoration: underline;
}

.mac-domain-compact-links {
    padding: 0.35rem 0.65rem 0.5rem;
    font-size: 0.8rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.45);
}

.mac-domain-link {
    text-decoration: none;
    color: var(--primary-color, #1446a0);
}

.mac-domain-link:hover {
    text-decoration: underline;
}

.mac-j-head {
    margin-bottom: 0.35rem;
}

.mac-j-head--with-slider {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    width: 100%;
    justify-content: flex-start;
}

.mac-j-head-time-first {
    flex: 0 0 auto;
    font-size: 0.875rem;
    color: var(--bs-secondary-color, #5c5c5c);
    white-space: nowrap;
}

.mac-j-head-center {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    flex: 1 1 160px;
    min-width: 0;
}

.mac-j-head-center .mac-j-student {
    margin-left: 0;
}

.mac-j-head-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

/* Обёртка: одна вертикальная линия со стрелками и «N / M» */
.mac-j-head-slider {
    display: flex;
    align-items: center;
    align-self: center;
    width: clamp(100px, 26vw, 220px);
    min-width: 90px;
    flex: 0 0 auto;
    /* После снятия padding tooltip трек чуть выше baseline кнопок sm — слегка вниз */
    transform: translateY(2px);
}

/* Dash кладёт на корень Slider padding под tooltip (типично 0 25px 25px) — без подписей это «пустое» место */
.mac-j-head-slider-inner {
    width: 100%;
    margin: 0 !important;
    padding: 0 8px !important;
    min-height: 0 !important;
    box-sizing: border-box;
}

.mac-j-head-slider-inner > div {
    padding: 0 !important;
    margin: 0 !important;
}

/* Слайдер событий: без подписей значения (tooltip / marks) */
.mac-j-head-slider .rc-slider-tooltip,
.mac-j-head-slider .rc-slider-mark,
.mac-j-head-slider .rc-slider-mark-text {
    display: none !important;
}

/* Без точек на каждом шаге (иначе при step=1 трек выглядит «рваным») */
.mac-j-head-slider .rc-slider-dot,
.mac-j-head-slider .rc-slider-dot-active {
    display: none !important;
    visibility: hidden !important;
}

.mac-j-head-slider .rc-slider-rail,
.mac-j-head-slider .rc-slider-track {
    border-radius: 3px;
}

/* Минимальный вертикальный зазор только под ручку (без «полки» под подпись) */
.mac-j-head-slider .rc-slider {
    margin: 0 !important;
    padding-top: 2px !important;
    padding-bottom: 2px !important;
}

.mac-j-head-controls .mac-j-pager {
    align-self: center;
}

.mac-j-context {
    margin-bottom: 0.35rem;
}

.mac-j-task-link {
    font-weight: 600;
}

.mac-j-sql-wrap {
    max-height: 280px;
    overflow: auto;
    border: 1px solid var(--border-color, #dfdfdf);
    border-radius: 6px;
    background: #fff;
    padding: 0.35rem 0.5rem;
}

.mac-j-sql {
    font-size: 0.8rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.mac-j-pager-btn {
    min-width: 2rem;
    padding: 0.1rem 0.35rem;
}
