/* =========================================================
   code357: detail.tabs  —  component CSS
   Префикс: dt-  (detail tabs)
   CSS-переменные с fallback — компонент работает в любой теме
   ========================================================= */

/* --- Описание / prose --- */
.dt-body         { margin-bottom: 40px; }
.dt-prose        { max-width: 780px; font-size: 16px; line-height: 1.75; color: var(--c-fg, #1e293b); }
.dt-body.dt-body--center .dt-prose { margin-left: auto; margin-right: auto; }
.dt-body.dt-body--full   .dt-prose { max-width: 100%; }
.dt-prose h1 { font-size: 28px; font-weight: 700; margin: 40px 0 16px; }
.dt-prose h2 { font-size: 22px; font-weight: 700; margin: 32px 0 12px; }
.dt-prose h3 { font-size: 18px; font-weight: 600; margin: 24px 0 8px; }
.dt-prose > :first-child { margin-top: 0; }
.dt-prose p  { margin: 0 0 16px; }
.dt-prose ul, .dt-prose ol { margin: 0 0 16px; padding-left: 20px; }
.dt-prose li  { margin-bottom: 6px; }
.dt-prose img { max-width: 100%; margin: 16px 0; }

/* --- Вкладки (контейнер) --- */
.dt-tabs         { margin-bottom: 32px; }
.dt-tablist      { display: flex; gap: 6px; margin-bottom: 24px; flex-wrap: wrap; }
.dt-tabpanel[hidden] { display: none; }

/* Выравнивание tablist */
.dt-tabs.dt-body--center .dt-tablist { max-width: 780px; width: 100%; margin-left: auto; margin-right: auto; }

/* --- Стиль: pills --- */
.dt-tabs--pills .dt-tab {
    display: inline-flex; align-items: center;
    padding: 8px 18px;
    font-size: var(--font-base, 15px); font-weight: 500; font-family: inherit;
    border: none; cursor: pointer; border-radius: 999px;
    background: var(--c-line, #e2e8f0); color: var(--c-fg, #1e293b);
    transition: background .2s, color .2s; line-height: 1.3;
}
.dt-tabs--pills .dt-tab:hover { background: var(--c-line-2, #cbd5e1); }
.dt-tabs--pills .dt-tab--active { background: var(--c-accent, #2563eb); color: #fff; }
.dt-tabs--pills .dt-tab--active:hover { background: var(--c-accent, #2563eb); opacity: .9; }

/* --- Стиль: underline --- */
.dt-tabs--underline .dt-tablist { gap: 0; }
.dt-tabs--underline .dt-tab {
    display: inline-flex; align-items: center;
    padding: 10px 16px;
    font-size: var(--font-base, 15px); font-weight: 500; font-family: inherit;
    border: none; border-bottom: 2px solid transparent;
    cursor: pointer; background: transparent;
    color: var(--c-muted, #64748b);
    transition: color .2s, border-color .2s; line-height: 1.3;
}
.dt-tabs--underline .dt-tab:hover   { color: var(--c-fg, #1e293b); }
.dt-tabs--underline .dt-tab--active { color: var(--c-accent, #2563eb); border-bottom-color: var(--c-accent, #2563eb); }

/* --- Стиль: line (трек под всеми + метка активного) --- */
.dt-tabs--line .dt-tablist { gap: 0; border-bottom: 1px solid var(--c-line, #e2e8f0); }
.dt-tabs--line .dt-tab {
    display: inline-flex; align-items: center;
    padding: 10px 16px; margin-bottom: -1px;
    font-size: var(--font-base, 15px); font-weight: 500; font-family: inherit;
    border: none; border-bottom: 2px solid transparent;
    cursor: pointer; background: transparent;
    color: var(--c-muted, #64748b);
    transition: color .2s, border-color .2s; line-height: 1.3;
}
.dt-tabs--line .dt-tab:hover   { color: var(--c-fg, #1e293b); }
.dt-tabs--line .dt-tab--active { color: var(--c-accent, #2563eb); border-bottom-color: var(--c-accent, #2563eb); }

/* --- Tabpanel выравнивание --- */
.dt-tabpanel.dt-body--center .dt-specs,
.dt-tabpanel.dt-body--center .dt-files-grid,
.dt-tabpanel.dt-body--center .dt-files-list,
.dt-tabpanel.dt-body--center .dt-faq-list { margin-left: auto; margin-right: auto; }
.dt-tabpanel.dt-body--full .dt-specs,
.dt-tabpanel.dt-body--full .dt-files-grid,
.dt-tabpanel.dt-body--full .dt-files-list,
.dt-tabpanel.dt-body--full .dt-faq-list   { max-width: 100%; }

/* --- Характеристики --- */
.dt-specs        { display: flow-root; max-width: 780px; }
.dt-section.dt-body--center .dt-specs  { margin-left: auto; margin-right: auto; }
.dt-section.dt-body--full   .dt-specs  { max-width: 100%; }
.dt-specs__list  { margin: 0; padding: 0; }
.dt-specs__row {
    display: grid;
    grid-template-columns: minmax(160px, 40%) 1fr;
    gap: 12px 24px; padding: 10px 0;
    border-bottom: 1px solid var(--c-line, #e2e8f0);
    align-items: baseline;
}
.dt-specs__name  { font-size: 14px; font-weight: 500; color: var(--c-fg, #1e293b); margin: 0; }
.dt-specs__value { font-size: 14px; color: var(--c-fg, #1e293b); margin: 0; line-height: 1.5; }
@media (max-width: 480px) { .dt-specs__row { grid-template-columns: 1fr; gap: 2px; } }

/* Striped-вариант */
.dt-specs--striped .dt-specs__row {
    border-bottom: 1px solid var(--c-line, #e5e7eb); border-top: none;
    padding: 10px 16px; grid-template-columns: minmax(140px, 33%) 1fr;
    background: transparent;
}
.dt-specs--striped .dt-specs__row:nth-child(even) { background: rgba(0,0,0,.04); }
@media (max-width: 480px) { .dt-specs--striped .dt-specs__row { grid-template-columns: 1fr; gap: 2px; padding: 8px 12px; } }

/* --- Документы: карточки --- */
.dt-files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px; max-width: 780px;
}
.dt-section.dt-body--center .dt-files-grid { margin-left: auto; margin-right: auto; }
.dt-section.dt-body--full   .dt-files-grid { max-width: 100%; }
.dt-file-card {
    display: flex; flex-direction: column; align-items: center;
    text-decoration: none; padding: 16px 12px 12px;
    background: var(--c-surface, #fff); border: 1px solid var(--c-line, #e2e8f0);
    border-radius: 8px; gap: 8px; text-align: center;
    transition: border-color .2s, box-shadow .2s;
}
.dt-file-card:hover { border-color: var(--c-accent, #2563eb); box-shadow: 0 2px 8px rgba(0,0,0,.07); }
.dt-file-icon       { position: relative; width: 48px; height: 58px; flex-shrink: 0; }
.dt-file-icon svg   { width: 100%; height: 100%; }
.dt-file-ext {
    position: absolute; bottom: 5px; left: 50%; transform: translateX(-50%);
    color: #fff; font-size: 9px; font-weight: 700; letter-spacing: .5px;
    padding: 2px 5px; border-radius: 3px; text-transform: uppercase; white-space: nowrap;
}
.dt-file-name {
    font-size: 12px; color: var(--c-fg, #1e293b); line-height: 1.3;
    word-break: break-all; display: -webkit-box;
    -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.dt-file-size { font-size: 11px; color: var(--c-muted, #64748b); white-space: nowrap; }

/* --- Документы: список --- */
.dt-files-list  { display: flex; flex-direction: column; max-width: 780px; }
.dt-section.dt-body--center .dt-files-list { margin-left: auto; margin-right: auto; }
.dt-section.dt-body--full   .dt-files-list { max-width: 100%; }
.dt-file-row {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border-bottom: 1px solid var(--c-line, #e2e8f0);
    text-decoration: none; color: var(--c-fg, #1e293b); transition: background .15s;
}
.dt-file-row:first-child { border-top: 1px solid var(--c-line, #e2e8f0); }
.dt-file-row:hover { background: rgba(0,0,0,.03); }
.dt-file-row__badge {
    flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 22px; border-radius: 3px;
    font-size: 10px; font-weight: 700; letter-spacing: .03em; color: #fff; text-transform: uppercase;
}
.dt-file-row__name {
    flex: 1; min-width: 0; font-size: 14px; font-weight: 500;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dt-file-row__size { flex-shrink: 0; font-size: 12px; color: var(--c-muted, #64748b); }
.dt-file-row__icon { flex-shrink: 0; width: 16px; height: 16px; color: var(--c-muted, #64748b); }
.dt-file-row:hover .dt-file-row__icon { color: var(--c-accent, #2563eb); }

/* --- FAQ --- */
.dt-faq-list { display: block; max-width: 780px; }
.dt-section.dt-body--center .dt-faq-list { margin-left: auto; margin-right: auto; }
.dt-section.dt-body--full   .dt-faq-list { max-width: 100%; }
.dt-faq-item { display: block; border-bottom: 1px solid var(--c-line, #e2e8f0); width: 100%; }
.dt-faq-item summary {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; padding: 14px 0; cursor: pointer;
    font-size: 15px; font-weight: 600; color: var(--c-fg, #1e293b); list-style: none;
}
.dt-faq-item summary::-webkit-details-marker { display: none; }
.dt-faq-item summary h3 { margin: 0; font-size: inherit; font-weight: inherit; }
.dt-faq-chev { width: 18px; height: 18px; flex-shrink: 0; color: var(--c-muted, #64748b); transition: transform .25s; }
.dt-faq-item[open] .dt-faq-chev { transform: rotate(180deg); }
.dt-faq-item__body { padding: 0 0 14px; color: var(--c-fg, #1e293b); line-height: 1.6; }

/* --- Режим без вкладок (секции подряд) --- */
.dt-notabs { display: flex; flex-direction: column; gap: 0; }
.dt-notabs--divided > * { border-top: 1px solid var(--c-line, #e2e8f0); padding-top: 32px; }
.dt-notabs--divided > * { padding-bottom: 32px; margin-bottom: 0; }

/* Секция */
.dt-section { margin-bottom: 32px; }
.dt-section__title {
    font-size: 1.25em; font-weight: 700; margin: 0 0 16px; color: var(--c-fg, #1e293b);
    max-width: 780px;
}
.dt-section.dt-body--center .dt-section__title { margin-left: auto; margin-right: auto; }
.dt-section.dt-body--full   .dt-section__title { max-width: 100%; }
