/* Page-specific v2 polish for Gathering and Recipes. */
.ms-v2-tool-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px 28px;
    align-items: end;
    margin-bottom: 18px;
}

.ms-v2-tool-hero .ms-v2-eyebrow {
    grid-column: 1 / -1;
    margin-bottom: -4px;
}

.ms-v2-tool-hero h1 {
    max-width: 720px;
    margin-bottom: 12px;
}

.ms-v2-tool-hero p:not(.ms-v2-eyebrow) {
    max-width: 720px;
    margin: 0;
    color: var(--ms-ink-2);
    font-size: 15.5px;
    line-height: 1.55;
}

.ms-v2-tool-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.ms-v2-tool-filter {
    margin-bottom: 14px !important;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.ms-v2-tool-filter > .ms-v2-toolbar {
    width: 100%;
    margin: 0 !important;
    padding: 13px 14px;
}

.ms-v2-toolbar.ms-v2-tool-filter {
    width: 100%;
    margin: 0 0 14px !important;
    padding: 13px 14px;
}

.ms-v2-tool-form {
    flex: 1 1 720px;
}

.ms-v2-tool-form label {
    align-self: center;
    margin: 0;
}

.ms-v2-tool-form select {
    min-width: 145px;
}

.ms-v2-tool-form select[multiple] {
    height: var(--ms-control-height);
    overflow-y: hidden;
}

.ms-v2-leves-page #SelectedJob {
    height: var(--ms-control-height) !important;
    min-height: var(--ms-control-height) !important;
    overflow-y: hidden;
}

.ms-v2-tool-checks {
    display: flex;
    flex: 1 1 360px;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    color: var(--ms-ink-2);
    font-size: 13px;
    line-height: 1.4;
}

.ms-v2-tool-checks span,
.ms-v2-tool-checks p {
    margin: 0;
}

.ms-v2-tool-grid {
    margin: 0 !important;
}

.ms-v2-tool-table {
    width: 100%;
    padding: 10px;
    overflow-x: auto;
}

.ms-v2-tool-table table.dataTable {
    border-collapse: separate;
    border-spacing: 0;
}

.ms-v2-tool-table #gatheringTable,
.ms-v2-tool-table #recipesTable,
.ms-v2-tool-table #LeveDataTable,
.ms-v2-tool-table #TransmutationTable {
    min-width: 980px;
}

.ms-v2-tool-table #gatheringTable thead th:first-child,
.ms-v2-tool-table #gatheringTable tbody td:first-child,
.ms-v2-tool-table #recipesTable thead th:first-child,
.ms-v2-tool-table #recipesTable tbody td:first-child,
.ms-v2-tool-table #LeveDataTable thead th:first-child,
.ms-v2-tool-table #LeveDataTable tbody td:first-child,
.ms-v2-tool-table #TransmutationTable thead th:first-child,
.ms-v2-tool-table #TransmutationTable tbody td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: var(--ms-surface);
}

.ms-v2-tool-table #gatheringTable thead th:first-child,
.ms-v2-tool-table #recipesTable thead th:first-child,
.ms-v2-tool-table #LeveDataTable thead th:first-child,
.ms-v2-tool-table #TransmutationTable thead th:first-child {
    z-index: 3;
    background: var(--ms-surface-2);
}

.ms-v2-tool-table #gatheringTable tbody tr:nth-child(even) td:first-child,
.ms-v2-tool-table #recipesTable tbody tr:nth-child(even) td:first-child,
.ms-v2-tool-table #LeveDataTable tbody tr:nth-child(even) td:first-child,
.ms-v2-tool-table #TransmutationTable tbody tr:nth-child(even) td:first-child {
    background: #1b1712;
}

.ms-v2-tool-table #gatheringTable tbody tr:hover td:first-child,
.ms-v2-tool-table #recipesTable tbody tr:hover td:first-child,
.ms-v2-tool-table #LeveDataTable tbody tr:hover td:first-child,
.ms-v2-tool-table #TransmutationTable tbody tr:hover td:first-child {
    background: var(--ms-hover);
}

.ms-v2-tool-table #gatheringTable a,
.ms-v2-tool-table #recipesTable a,
.ms-v2-tool-table #LeveDataTable a,
.ms-v2-tool-table #TransmutationTable a,
.ms-v2-recipes-page .recipeTableClass a {
    color: var(--ms-accent);
    font-family: "IBM Plex Sans", "Segoe UI", Arial, sans-serif;
    font-weight: 700;
}

.ms-v2-tool-table .quantity a,
.ms-v2-recipes-page .quantity a {
    color: var(--ms-single) !important;
}

.ms-v2-tool-table .iconSized,
.ms-v2-recipes-page .recipeTableClass .iconSized,
.ms-v2-recipes-page .recipeTableClass .mediumIcon {
    width: 32px;
    height: 32px;
    object-fit: cover;
    vertical-align: middle;
}

.ms-v2-tool-table input.copy_button,
.ms-v2-tool-table input.copybtn,
.ms-v2-recipes-page input.copybtn {
    width: 16px;
    height: 16px;
    margin-left: 7px;
    padding: 0;
    border: 0 !important;
    background: transparent !important;
}

.ms-v2-recipes-page > .ms-v2-data-panel {
    width: 100%;
    margin: 0 0 14px !important;
}

.ms-v2-recipes-page > .ms-v2-recipe-holder,
.ms-v2-recipes-page > .ms-v2-recipe-detail-grid {
    width: 100%;
    margin: 0 !important;
    padding: 0;
}

.ms-v2-recipes-page > .ms-v2-recipe-holder:empty {
    display: none;
}

.ms-v2-recipes-page .recipeTableClass {
    float: none;
    width: 100%;
    max-width: none;
    margin: 0 0 14px;
    padding: 16px;
    border: 1px solid var(--ms-line);
    border-radius: 8px;
    background: var(--ms-surface);
    box-shadow: var(--ms-shadow);
}

.ms-v2-recipes-page .recipeTableClass h3 {
    margin: 0 0 12px;
}

.ms-v2-recipes-page .recipeTableClass table {
    width: 100%;
    margin-bottom: 12px;
}

.ms-v2-recipes-page .recipeTableClass p {
    margin: 0;
    color: var(--ms-ink-2);
    font-family: "JetBrains Mono", "Consolas", monospace;
    font-size: 12px;
}

.ms-v2-workflow-grid,
.ms-v2-leves-page > .ms-v2-data-panel,
.ms-v2-transmutation-page .ms-v2-data-panel {
    width: 100%;
    margin: 0 0 14px !important;
}

.ms-v2-transmutation-page > .col-lg-7,
.ms-v2-leves-page > .ms-v2-filter-panel,
.ms-v2-workflow-grid > [class*="col-"] {
    float: none;
    width: 100%;
    max-width: none;
    min-width: 0;
    padding-left: 0;
    padding-right: 0;
}

.ms-v2-workflow-summary {
    margin: 0 0 14px;
    padding: 14px;
    border: 1px solid var(--ms-line);
    border-radius: 8px;
    background: var(--ms-bg-2);
}

.ms-v2-workflow-summary h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 8px !important;
    font-size: clamp(22px, 2.2vw, 31px);
}

.ms-v2-workflow-summary p {
    max-width: 760px;
    margin: 0;
}

.ms-v2-workflow-notes {
    width: 100%;
    margin-top: 12px;
    padding: 12px 14px;
    border: 1px solid var(--ms-line);
    border-radius: 8px;
    background: var(--ms-bg-2);
}

.ms-v2-workflow-notes[open] {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 16px;
}

.ms-v2-workflow-notes summary {
    color: var(--ms-accent);
    cursor: pointer;
    font-family: "JetBrains Mono", "Consolas", monospace;
    font-size: 11px;
    font-weight: 700;
    text-transform: lowercase;
}

.ms-v2-workflow-notes[open] summary {
    grid-column: 1 / -1;
    margin-bottom: 2px;
}

.ms-v2-workflow-notes span,
.ms-v2-workflow-notes p {
    margin: 0;
    color: var(--ms-ink-2);
    font-size: 13px;
    line-height: 1.55;
}

.ms-v2-workflow-notes p:last-child {
    grid-column: 1 / -1;
    padding-top: 10px;
    border-top: 1px solid var(--ms-line);
}

@media (max-width: 860px) {
    .ms-v2-tool-hero {
        grid-template-columns: 1fr;
    }

    .ms-v2-tool-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 760px) {
    .ms-v2-tool-filter > .ms-v2-toolbar,
    .ms-v2-tool-table,
    .ms-v2-recipes-page .recipeTableClass {
        padding: 12px;
    }

    .ms-v2-tool-form,
    .ms-v2-tool-checks {
        flex: 1 1 auto;
        width: 100%;
    }

    .ms-v2-tool-form label,
    .ms-v2-tool-form select,
    .ms-v2-tool-actions .ms-v2-btn {
        width: 100%;
    }

    .ms-v2-tool-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .ms-v2-workflow-notes {
        grid-template-columns: 1fr;
    }
}
