/*
 * tax-disputes.css — Локальные стили раздела "Споры с налоговой"
 * Подключается только внутри /spory-s-nalogovoy/
 * Использует CSS-переменные из redesign.css
 */

/* ============================================
   Навигация раздела (левое меню)
   ============================================ */
.td-nav {
    margin-bottom: 24px;
    border: 1px solid var(--border, #d9e8f8);
    border-radius: var(--radius, 8px);
    overflow: hidden;
}
.td-nav__title {
    background: var(--primary, #3288db);
    color: #fff;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
}
.td-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.td-nav__list li {
    border-bottom: 1px solid var(--border, #d9e8f8);
}
.td-nav__list li:last-child {
    border-bottom: none;
}
.td-nav__list a {
    display: block;
    padding: 9px 14px;
    color: var(--text, #333);
    text-decoration: none;
    font-size: 13px;
    line-height: 1.4;
    transition: background 0.2s;
}
.td-nav__list a:hover {
    background: var(--bg-light, #f4f8fd);
    color: var(--primary-dark, #1e66b5);
}
.td-nav__list .td-nav__active a {
    background: var(--bg-light, #f4f8fd);
    color: var(--primary-dark, #1e66b5);
    font-weight: 600;
    border-left: 3px solid var(--primary, #3288db);
}

/* ============================================
   Summary-блок (краткий ответ вверху страницы)
   ============================================ */
.td-summary {
    background: var(--bg-light, #f4f8fd);
    border: 1px solid var(--border, #d9e8f8);
    border-left: 4px solid var(--primary, #3288db);
    border-radius: var(--radius-sm, 4px);
    padding: 14px 18px;
    margin-bottom: 22px;
    font-size: 14px;
    line-height: 1.6;
}
.td-summary p:last-child {
    margin-bottom: 0;
}

/* ============================================
   Карточка риска
   ============================================ */
.td-risk-card {
    border: 1px solid #ddd;
    border-radius: var(--radius, 8px);
    padding: 16px;
    margin-bottom: 22px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.td-risk-card__item {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 13px;
    line-height: 1.4;
}
.td-risk-card__item strong {
    white-space: nowrap;
}
.td-risk-card--critical {
    border-color: #e74c3c;
    background: #fef5f5;
}
.td-risk-card--high {
    border-color: #e67e22;
    background: #fef9f2;
}
.td-risk-card--medium {
    border-color: #f1c40f;
    background: #fffdf2;
}
.td-risk-card--low {
    border-color: #27ae60;
    background: #f2fdf6;
}
@media (max-width: 600px) {
    .td-risk-card {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Карточки документов (сетка на главной)
   ============================================ */
.td-docs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 22px;
}
.td-doc-card {
    border: 1px solid var(--border, #d9e8f8);
    border-radius: var(--radius, 8px);
    padding: 14px;
    text-decoration: none;
    color: var(--text, #333);
    transition: box-shadow 0.2s, border-color 0.2s;
    display: block;
}
.td-doc-card:hover {
    border-color: var(--primary, #3288db);
    box-shadow: var(--shadow-sm, 0 2px 8px rgba(50,136,219,0.10));
}
.td-doc-card__title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--primary-dark, #1e66b5);
    line-height: 1.3;
}
.td-doc-card__desc {
    font-size: 12px;
    color: var(--muted, #828d98);
    line-height: 1.4;
}
.td-doc-card__risk {
    display: inline-block;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 3px;
    margin-top: 6px;
    font-weight: 600;
}
.td-doc-card__risk--critical { background: #fce4e4; color: #c0392b; }
.td-doc-card__risk--high { background: #fdebd0; color: #d35400; }
.td-doc-card__risk--medium { background: #fef9e7; color: #b7950b; }

@media (max-width: 600px) {
    .td-docs-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Пошаговый план (нумерованные шаги)
   ============================================ */
.td-steps {
    counter-reset: td-step;
    list-style: none;
    padding: 0;
    margin: 0 0 22px;
}
.td-steps li {
    counter-increment: td-step;
    padding: 10px 10px 10px 44px;
    position: relative;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    line-height: 1.5;
}
.td-steps li:last-child {
    border-bottom: none;
}
.td-steps li::before {
    content: counter(td-step);
    position: absolute;
    left: 0;
    top: 10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary, #3288db);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   Блок ошибок
   ============================================ */
.td-mistakes {
    list-style: none;
    padding: 0;
    margin: 0 0 22px;
}
.td-mistakes li {
    padding: 8px 10px 8px 28px;
    position: relative;
    font-size: 13px;
    line-height: 1.5;
    border-bottom: 1px solid #f0f0f0;
}
.td-mistakes li::before {
    content: "\2717";
    position: absolute;
    left: 6px;
    color: #e74c3c;
    font-weight: bold;
}
.td-mistakes li:last-child {
    border-bottom: none;
}

/* ============================================
   Кейс
   ============================================ */
.td-case {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius, 8px);
    padding: 16px;
    margin-bottom: 22px;
    font-size: 13px;
    line-height: 1.6;
}
.td-case__label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted, #828d98);
    margin-bottom: 8px;
}
.td-case__result {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e5e7eb;
    font-weight: 600;
    color: #27ae60;
}

/* ============================================
   FAQ аккордеон (на чистом CSS через details)
   ============================================ */
.td-faq details {
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-sm, 4px);
    margin-bottom: 8px;
}
.td-faq summary {
    padding: 12px 14px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    list-style: none;
    position: relative;
    padding-right: 30px;
}
.td-faq summary::-webkit-details-marker {
    display: none;
}
.td-faq summary::after {
    content: "+";
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--muted, #828d98);
    transition: transform 0.2s;
}
.td-faq details[open] summary::after {
    content: "\2212";
}
.td-faq details div {
    padding: 0 14px 14px;
    font-size: 13px;
    line-height: 1.6;
    color: #555;
}

/* ============================================
   Таблицы
   ============================================ */
.td-table-wrap {
    overflow-x: auto;
    margin-bottom: 22px;
}
.td-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.td-table th {
    background: var(--bg-light, #f4f8fd);
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--border, #d9e8f8);
    white-space: nowrap;
}
.td-table td {
    padding: 9px 12px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
    line-height: 1.4;
}
.td-table tr:hover td {
    background: #fafbfc;
}

/* ============================================
   CTA блок
   ============================================ */
.td-cta {
    background: var(--bg-light, #f4f8fd);
    border: 1px solid var(--border, #d9e8f8);
    border-radius: var(--radius, 8px);
    padding: 18px;
    margin: 24px 0;
    text-align: center;
}
.td-cta__title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}
.td-cta__text {
    font-size: 13px;
    color: var(--muted, #828d98);
    margin-bottom: 14px;
}
.td-cta__btn {
    display: inline-block;
    background: var(--primary, #3288db);
    color: #fff;
    padding: 10px 28px;
    border-radius: var(--radius-sm, 4px);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}
.td-cta__btn:hover {
    background: var(--primary-dark, #1e66b5);
    color: #fff;
}

/* ============================================
   Перелинковка (связанные материалы)
   ============================================ */
.td-related {
    border-top: 1px solid #eee;
    padding-top: 18px;
    margin-top: 24px;
}
.td-related__title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
}
.td-related__list {
    list-style: none;
    padding: 0;
    margin: 0;
    columns: 2;
    column-gap: 20px;
}
.td-related__list li {
    padding: 4px 0;
    font-size: 13px;
    break-inside: avoid;
}
.td-related__list a {
    color: var(--primary, #3288db);
    text-decoration: none;
}
.td-related__list a:hover {
    text-decoration: underline;
}
@media (max-width: 600px) {
    .td-related__list {
        columns: 1;
    }
}

/* ============================================
   Чек-лист
   ============================================ */
.td-checklist {
    list-style: none;
    padding: 0;
    margin: 0 0 22px;
}
.td-checklist li {
    padding: 5px 0 5px 24px;
    position: relative;
    font-size: 13px;
    line-height: 1.5;
}
.td-checklist li::before {
    content: "\2610";
    position: absolute;
    left: 0;
    color: var(--primary, #3288db);
    font-size: 15px;
}

/* ============================================
   Дисклеймер
   ============================================ */
.td-disclaimer {
    font-size: 11px;
    color: #999;
    line-height: 1.5;
    border-top: 1px solid #eee;
    padding-top: 14px;
    margin-top: 24px;
}

/* ============================================
   Стадии спора (timeline)
   ============================================ */
.td-timeline {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: 22px;
}
.td-timeline__item {
    flex: 1;
    min-width: 120px;
    text-align: center;
    padding: 12px 8px;
    position: relative;
    font-size: 12px;
    line-height: 1.3;
    text-decoration: none;
    color: var(--text, #333);
    border: 1px solid var(--border, #d9e8f8);
    border-right: none;
    background: #fff;
    transition: background 0.2s;
}
.td-timeline__item:last-child {
    border-right: 1px solid var(--border, #d9e8f8);
    border-radius: 0 var(--radius-sm, 4px) var(--radius-sm, 4px) 0;
}
.td-timeline__item:first-child {
    border-radius: var(--radius-sm, 4px) 0 0 var(--radius-sm, 4px);
}
.td-timeline__item:hover {
    background: var(--bg-light, #f4f8fd);
}
.td-timeline__num {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary, #3288db);
    margin-bottom: 4px;
}
@media (max-width: 600px) {
    .td-timeline {
        flex-direction: column;
    }
    .td-timeline__item {
        border-right: 1px solid var(--border, #d9e8f8);
        border-bottom: none;
        border-radius: 0;
    }
    .td-timeline__item:first-child {
        border-radius: var(--radius-sm, 4px) var(--radius-sm, 4px) 0 0;
    }
    .td-timeline__item:last-child {
        border-bottom: 1px solid var(--border, #d9e8f8);
        border-radius: 0 0 var(--radius-sm, 4px) var(--radius-sm, 4px);
    }
}
