/* DP Calculator */

.dt-subpage--dp .dt-subpage__banner {
    margin-bottom: 1.25rem;
}

.dt-dp-gate {
    padding: 2rem 1.25rem;
    border: 1px solid rgba(201, 166, 107, 0.28);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.22);
    text-align: center;
}

.dt-dp-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
    gap: 1.25rem;
    align-items: start;
}

.dt-dp-main {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.dt-dp-card {
    padding: 1rem 1.1rem 1.15rem;
    border: 1px solid rgba(201, 166, 107, 0.25);
    border-radius: 12px;
    background: rgba(12, 10, 8, 0.55);
}

.dt-dp-card--result {
    border-color: rgba(201, 166, 107, 0.45);
    background: rgba(201, 166, 107, 0.08);
}

.dt-dp-card__title {
    margin: 0 0 0.65rem;
    font-size: 1.05rem;
    color: rgba(242, 232, 213, 0.95);
}

.dt-dp-subtitle {
    margin: 0 0 0.45rem;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    color: rgba(201, 166, 107, 0.88);
}

.dt-dp-hint {
    margin: 0 0 0.75rem;
    font-size: 0.82rem;
    color: rgba(242, 232, 213, 0.55);
    line-height: 1.45;
}

.dt-dp-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
}

.dt-dp-select {
    min-width: min(100%, 18rem);
    flex: 1 1 14rem;
    padding: 0.45rem 0.6rem;
    border-radius: 8px;
    border: 1px solid rgba(201, 166, 107, 0.35);
    background: rgba(0, 0, 0, 0.35);
    color: inherit;
    font: inherit;
}

.dt-dp-picker {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
    margin-bottom: 0.85rem;
}

.dt-dp-picker .dt-dp-select {
    flex: 1 1 auto;
    min-width: 0;
}

.dt-dp-add {
    flex: 0 0 2.6rem;
    width: 2.6rem;
    border: 1px solid rgba(201, 166, 107, 0.55);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(201, 166, 107, 0.28), rgba(201, 166, 107, 0.12));
    color: var(--dt-gold, #c9a66b);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.dt-dp-add:hover {
    border-color: rgba(242, 220, 170, 0.85);
    color: #f2e8d5;
}

.dt-dp-status {
    margin: 0.65rem 0 0;
    font-size: 0.85rem;
    color: rgba(201, 166, 107, 0.9);
}

.dt-dp-status.is-error {
    color: #e8a090;
}

.dt-dp-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.dt-dp-checklist {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-height: 280px;
    overflow: auto;
    padding-right: 0.25rem;
}

.dt-dp-check {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 0.45rem;
    row-gap: 0.1rem;
    padding: 0.4rem 0.5rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
}

.dt-dp-check input {
    grid-row: 1 / span 2;
    margin-top: 0.2rem;
}

.dt-dp-check__name {
    font-size: 0.9rem;
}

.dt-dp-check__meta {
    font-size: 0.75rem;
    color: rgba(201, 166, 107, 0.75);
}

.dt-dp-items {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.dt-dp-item {
    padding: 0.7rem 0.75rem;
    border: 1px solid rgba(201, 166, 107, 0.2);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.22);
}

.dt-dp-item.is-selected {
    border-color: rgba(201, 166, 107, 0.55);
    background: rgba(201, 166, 107, 0.08);
}

.dt-dp-item__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.65rem;
    margin-bottom: 0.55rem;
}

.dt-dp-item__pick {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
}

.dt-dp-item__kind {
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    color: rgba(242, 232, 213, 0.5);
}

.dt-dp-item__hint {
    font-size: 0.75rem;
    color: rgba(201, 166, 107, 0.65);
}

.dt-dp-item__remove {
    margin-left: auto;
    appearance: none;
    width: 1.7rem;
    height: 1.7rem;
    border: 1px solid rgba(232, 160, 144, 0.35);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.3);
    color: #e8a090;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}

.dt-dp-badge {
    font-size: 0.68rem;
    padding: 0.12rem 0.4rem;
    border-radius: 999px;
    border: 1px solid rgba(201, 166, 107, 0.4);
    color: rgba(201, 166, 107, 0.95);
}

.dt-dp-badge.is-edited {
    border-color: rgba(232, 160, 144, 0.55);
    color: #e8a090;
}

.dt-dp-badge.is-muted {
    opacity: 0.65;
}

.dt-dp-item__fields {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 0.45rem;
}

.dt-dp-field {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.75rem;
    color: rgba(242, 232, 213, 0.65);
}

.dt-dp-field input[type="number"] {
    padding: 0.35rem 0.45rem;
    border-radius: 6px;
    border: 1px solid rgba(201, 166, 107, 0.28);
    background: rgba(0, 0, 0, 0.35);
    color: inherit;
    font: inherit;
}

.dt-dp-field--check {
    flex-direction: row;
    align-items: center;
    gap: 0.4rem;
    padding-top: 1.1rem;
}

.dt-dp-result {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.65rem 1rem;
    margin: 0 0 0.75rem;
}

.dt-dp-result dt {
    margin: 0;
    font-size: 0.72rem;
    color: rgba(201, 166, 107, 0.8);
}

.dt-dp-result dd {
    margin: 0.15rem 0 0;
    font-size: 1.15rem;
    color: rgba(242, 232, 213, 0.95);
}

.dt-dp-result__strong dd {
    color: var(--dt-gold, #c9a66b);
    font-weight: 600;
}

.dt-dp-save-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
    margin: 0.35rem 0 0.75rem;
}

.dt-dp-save-name {
    flex: 1 1 12rem;
    min-width: 0;
    padding: 0.5rem 0.65rem;
    border-radius: 8px;
    border: 1px solid rgba(201, 166, 107, 0.35);
    background: rgba(0, 0, 0, 0.35);
    color: inherit;
    font: inherit;
}

.dt-dp-empty {
    margin: 0;
    color: rgba(242, 232, 213, 0.45);
    font-size: 0.85rem;
}

/* Preset rail */

.dt-dp-rail {
    position: sticky;
    top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.dt-dp-rail__banner {
    position: relative;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0.35rem;
    padding: 1.25rem 1.1rem 1.1rem;
    border: 1px solid rgba(201, 166, 107, 0.32);
    border-radius: 10px;
    overflow: hidden;
    background-color: #0c0a08;
    background-image:
        radial-gradient(ellipse at 20% 15%, rgba(201, 166, 107, 0.22), transparent 55%),
        radial-gradient(ellipse at 85% 90%, rgba(90, 50, 30, 0.35), transparent 50%),
        linear-gradient(180deg, rgba(8, 6, 4, 0.2), rgba(8, 6, 4, 0.88));
}

.dt-dp-rail__eyebrow {
    margin: 0;
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    color: rgba(201, 166, 107, 0.85);
}

.dt-dp-rail__title {
    margin: 0;
    font-family: var(--dt-font-display, Georgia, serif);
    font-size: 1.35rem;
    color: rgba(242, 220, 170, 0.95);
}

.dt-dp-rail__sub {
    margin: 0;
    font-size: 0.82rem;
    color: rgba(242, 232, 213, 0.6);
    line-height: 1.45;
}

.dt-dp-presets {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: calc(100vh - 16rem);
    overflow: auto;
    padding-right: 0.15rem;
}

.dt-dp-preset {
    min-height: 180px;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 1rem 0.95rem 0.9rem;
    border: 1px solid rgba(201, 166, 107, 0.28);
    border-radius: 10px;
    background:
        radial-gradient(ellipse at 90% 0%, rgba(201, 166, 107, 0.12), transparent 55%),
        linear-gradient(180deg, rgba(14, 11, 8, 0.92), rgba(6, 5, 4, 0.96));
}

.dt-dp-preset__head {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.dt-dp-preset__title {
    margin: 0;
    flex: 1;
    font-size: 1rem;
    color: rgba(242, 220, 170, 0.95);
    line-height: 1.3;
}

.dt-dp-preset__del {
    appearance: none;
    width: 1.6rem;
    height: 1.6rem;
    border: 1px solid rgba(232, 160, 144, 0.35);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.35);
    color: #e8a090;
    cursor: pointer;
}

.dt-dp-preset__meta,
.dt-dp-preset__stats,
.dt-dp-preset__time {
    margin: 0;
    font-size: 0.78rem;
    color: rgba(242, 232, 213, 0.55);
    line-height: 1.4;
}

.dt-dp-preset__stats {
    color: rgba(201, 166, 107, 0.85);
}

.dt-dp-preset__load {
    margin-top: auto;
    width: 100%;
}

@media (max-width: 980px) {
    .dt-dp-shell {
        grid-template-columns: 1fr;
    }

    .dt-dp-rail {
        position: static;
        order: -1;
    }

    .dt-dp-presets {
        max-height: none;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}
