/* DEV-2.09 | SET-04 Disease / Indication Master */

.v2-theme .settings-indication {
    margin-top: 18px;
}

.v2-theme .settings-indication__toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 12px;
    padding: 16px 18px;
    border: 1px solid var(--v2-color-border);
    border-radius: var(--v2-radius-xl);
    background: var(--v2-color-surface);
    box-shadow: var(--v2-shadow-card);
}

.v2-theme .settings-indication__toolbar h2 {
    margin: 0;
    color: var(--v2-color-ink-950);
    font-size: var(--v2-font-size-18);
    font-weight: var(--v2-font-weight-bold);
}

.v2-theme .settings-indication__toolbar p {
    margin: 5px 0 0;
    max-width: 820px;
    color: var(--v2-color-ink-500);
    font-size: var(--v2-font-size-11);
    line-height: 1.55;
}

.v2-theme .settings-indication__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.v2-theme .settings-indication__panel {
    overflow: hidden;
    border: 1px solid var(--v2-color-border);
    border-radius: var(--v2-radius-xl);
    background: var(--v2-color-surface);
    box-shadow: var(--v2-shadow-card);
}

.v2-theme .settings-indication__filters {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) 210px 150px auto;
    align-items: end;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--v2-color-border-soft);
}

.v2-theme .settings-indication__filters label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    color: var(--v2-color-ink-600);
    font-size: var(--v2-font-size-10);
    font-weight: var(--v2-font-weight-semibold);
}

.v2-theme .settings-indication__count {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    color: var(--v2-color-ink-500);
    font-size: var(--v2-font-size-11);
    white-space: nowrap;
}

.v2-theme .settings-indication__table-wrap {
    max-height: calc(100vh - 390px);
    min-height: 350px;
    overflow: auto;
}

.v2-theme .settings-indication__table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    color: var(--v2-color-ink-900);
    font-size: 11.5px;
}

.v2-theme .settings-indication__table th {
    position: sticky;
    top: 0;
    z-index: 2;
    height: 36px;
    padding: 0 9px;
    border-bottom: 1px solid var(--v2-color-border);
    background: var(--v2-color-surface-muted);
    color: var(--v2-color-ink-600);
    text-align: left;
    font-size: 10px;
    font-weight: var(--v2-font-weight-bold);
    white-space: nowrap;
}

.v2-theme .settings-indication__table td {
    padding: 9px;
    overflow: hidden;
    border-bottom: 1px solid var(--v2-color-border-soft);
    text-overflow: ellipsis;
    vertical-align: middle;
}

.v2-theme .settings-indication__table tbody tr:hover {
    background: var(--v2-color-brand-050);
}

.v2-theme .settings-indication__table th:nth-child(1) { width: 10%; }
.v2-theme .settings-indication__table th:nth-child(2) { width: 21%; }
.v2-theme .settings-indication__table th:nth-child(3) { width: 25%; }
.v2-theme .settings-indication__table th:nth-child(4) { width: 17%; }
.v2-theme .settings-indication__table th:nth-child(5) { width: 7%; }
.v2-theme .settings-indication__table th:nth-child(6) { width: 7%; }
.v2-theme .settings-indication__table th:nth-child(7) { width: 8%; }
.v2-theme .settings-indication__table th:nth-child(8) { width: 15%; }

.v2-theme .settings-indication__group {
    display: inline-flex;
    max-width: 100%;
    padding: 4px 8px;
    overflow: hidden;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.v2-theme .settings-indication__group--brady {
    background: #eaf5ff;
    color: #275e92;
}

.v2-theme .settings-indication__group--tachy {
    background: #fff1e8;
    color: #995326;
}

.v2-theme .settings-indication__group--crt {
    background: #f0ecff;
    color: #5c47a6;
}

.v2-theme .settings-indication__row-actions {
    display: flex;
    gap: 5px;
    white-space: nowrap;
}

.v2-theme .settings-indication__muted,
.v2-theme .settings-indication__empty {
    color: var(--v2-color-ink-500);
}

.v2-theme .settings-indication__empty {
    padding: 28px;
    text-align: center;
}

.v2-theme .settings-indication__state {
    margin-top: 10px;
    padding: 9px 12px;
    border: 1px solid var(--v2-color-border);
    border-radius: var(--v2-radius-md);
    background: var(--v2-color-surface-soft);
    color: var(--v2-color-ink-600);
    font-size: var(--v2-font-size-11);
}

.v2-theme .settings-indication__state[data-level="error"] {
    border-color: #f2b6b6;
    background: #fff3f3;
    color: #9f2d2d;
}

.v2-theme .settings-indication-editor[hidden] {
    display: none !important;
}

.v2-theme .settings-indication-editor {
    position: fixed;
    inset: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    background: rgba(21, 43, 58, 0.34);
}

.v2-theme .settings-indication-editor__card {
    width: min(760px, calc(100vw - 48px));
    max-height: calc(100vh - 56px);
    overflow: hidden;
    border-radius: var(--v2-radius-xl);
    background: var(--v2-color-surface);
    box-shadow: 0 24px 70px rgba(24, 47, 62, 0.24);
}

.v2-theme .settings-indication-editor__header,
.v2-theme .settings-indication-editor__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--v2-color-border-soft);
}

.v2-theme .settings-indication-editor__header h2 {
    margin: 2px 0 0;
    color: var(--v2-color-ink-950);
    font-size: var(--v2-font-size-18);
}

.v2-theme .settings-indication-editor__eyebrow {
    color: var(--v2-color-brand-700);
    font-size: 10px;
    font-weight: 800;
}

.v2-theme .settings-indication-editor__close {
    width: 34px;
    height: 34px;
    border: 1px solid var(--v2-color-border);
    border-radius: 999px;
    background: var(--v2-color-surface);
    color: var(--v2-color-ink-600);
    font-size: 20px;
    cursor: pointer;
}

.v2-theme .settings-indication-editor__form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 20px 18px;
    overflow: auto;
}

.v2-theme .settings-indication-editor__form label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    color: var(--v2-color-ink-600);
    font-size: var(--v2-font-size-10);
    font-weight: var(--v2-font-weight-semibold);
}

.v2-theme .settings-indication-editor__wide {
    grid-column: 1 / -1;
}

.v2-theme .settings-indication-editor__check {
    flex-direction: row !important;
    align-items: center;
    align-self: end;
    min-height: 38px;
    gap: 8px !important;
}

.v2-theme .settings-indication-editor__check input {
    width: auto;
}

.v2-theme .settings-indication-editor__note {
    grid-column: 1 / -1;
    padding: 10px 12px;
    border-radius: var(--v2-radius-md);
    background: var(--v2-color-surface-soft);
    color: var(--v2-color-ink-500);
    font-size: 10.5px;
    line-height: 1.55;
}

.v2-theme .settings-indication-editor__footer {
    justify-content: flex-end;
    border-top: 1px solid var(--v2-color-border-soft);
    border-bottom: 0;
}

@media (max-width: 900px) {
    .v2-theme .settings-indication__filters {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .v2-theme .settings-indication__filters label:first-child {
        grid-column: 1 / -1;
    }

    .v2-theme .settings-indication__table th:nth-child(7),
    .v2-theme .settings-indication__table td:nth-child(7) {
        display: none;
    }
}

@media (max-width: 600px) {
    .v2-theme .settings-indication__toolbar,
    .v2-theme .settings-indication__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .v2-theme .settings-indication__filters {
        grid-template-columns: 1fr;
    }

    .v2-theme .settings-indication__filters label:first-child {
        grid-column: auto;
    }

    .v2-theme .settings-indication__count {
        justify-content: flex-start;
    }

    .v2-theme .settings-indication__table th:nth-child(3),
    .v2-theme .settings-indication__table td:nth-child(3),
    .v2-theme .settings-indication__table th:nth-child(5),
    .v2-theme .settings-indication__table td:nth-child(5) {
        display: none;
    }

    .v2-theme .settings-indication-editor {
        padding: 12px;
    }

    .v2-theme .settings-indication-editor__card {
        width: calc(100vw - 24px);
        max-height: calc(100vh - 24px);
    }

    .v2-theme .settings-indication-editor__form {
        grid-template-columns: 1fr;
    }

    .v2-theme .settings-indication-editor__wide,
    .v2-theme .settings-indication-editor__note {
        grid-column: auto;
    }
}
