/* DHA Marketplace maps library */

.ml-library {
    padding: 2.25rem 0 2rem;
    background:
        radial-gradient(circle at 88% 0%, rgba(20, 92, 76, 0.08), transparent 42%),
        linear-gradient(180deg, #f4f7f5 0%, #eef4f1 100%);
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
}

.ml-shell {
    display: grid;
    gap: 1rem;
}

.ml-path-kicker {
    display: block;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(16, 35, 31, 0.45);
}

.ml-path p {
    margin: 0.2rem 0 0;
    font-size: 0.92rem;
    color: rgba(16, 35, 31, 0.7);
}

.ml-search {
    position: relative;
    display: block;
}

.ml-search-icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(16, 35, 31, 0.45);
    pointer-events: none;
}

.ml-search input {
    width: 100%;
    min-height: 2.9rem;
    padding: 0.7rem 1rem 0.7rem 2.7rem;
    border-radius: 999px;
    border: 1px solid rgba(20, 92, 76, 0.14);
    background: #fff;
    color: var(--brand-deep, #0c3d33);
    font: inherit;
    font-weight: 500;
    box-shadow: 0 10px 24px rgba(12, 40, 34, 0.05);
}

.ml-search input:focus {
    outline: 2px solid rgba(20, 92, 76, 0.28);
    outline-offset: 1px;
    border-color: rgba(20, 92, 76, 0.4);
}

.ml-summary-card,
.ml-branch {
    border-radius: 1.2rem;
    background: #fff;
    border: 1px solid rgba(20, 92, 76, 0.12);
    box-shadow: 0 14px 30px rgba(12, 40, 34, 0.05);
}

.ml-summary-card {
    padding: 1.1rem 1.15rem;
}

.ml-summary-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.ml-summary-head h3,
.ml-library-head h3 {
    margin: 0 0 0.2rem;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--brand-deep, #0c3d33);
}

.ml-summary-head p,
.ml-library-head p {
    margin: 0;
    color: rgba(16, 35, 31, 0.62);
    font-size: 0.9rem;
}

.ml-count-badge {
    flex: 0 0 auto;
    min-width: 2.5rem;
    height: 2.5rem;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: var(--brand, #145c4c);
    color: #fff;
    font-weight: 800;
    font-size: 0.95rem;
}

.ml-branch-summary {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.45rem;
}

.ml-branch-summary-btn {
    width: 100%;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.75rem;
    align-items: center;
    text-align: left;
    padding: 0.75rem 0.8rem;
    border-radius: 0.95rem;
    border: 1px solid rgba(20, 92, 76, 0.1);
    background: #f5f8f6;
    color: inherit;
    font: inherit;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.ml-branch-summary-btn:hover {
    background: #eef5f1;
    border-color: rgba(20, 92, 76, 0.22);
    transform: translateY(-1px);
}

.ml-branch-ico {
    width: 2.2rem;
    height: 2.2rem;
    display: grid;
    place-items: center;
    border-radius: 0.7rem;
    background: rgba(20, 92, 76, 0.1);
    color: var(--brand, #145c4c);
}

.ml-branch-summary-copy {
    display: grid;
    gap: 0.1rem;
    min-width: 0;
}

.ml-branch-summary-copy strong,
.ml-branch-toggle strong,
.ml-plan-copy strong {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--brand-deep, #0c3d33);
}

.ml-branch-summary-copy small,
.ml-branch-toggle small,
.ml-plan-copy span {
    color: #3d524c;
    font-size: 0.8rem;
}

.ml-branch-count {
    min-width: 1.7rem;
    height: 1.7rem;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(20, 92, 76, 0.12);
    color: var(--brand, #145c4c);
    font-size: 0.78rem;
    font-weight: 800;
}

.ml-library-head {
    margin-top: 0.25rem;
}

.ml-branch-list {
    display: grid;
    gap: 0.7rem;
}

.ml-branch-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.65rem;
    align-items: center;
    padding: 0.85rem 0.95rem;
}

.ml-branch-toggle {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.7rem;
    align-items: center;
    text-align: left;
    border: 0;
    background: transparent;
    font: inherit;
    color: inherit;
    cursor: pointer;
    padding: 0;
}

.ml-chevron {
    width: 0.7rem;
    height: 0.7rem;
    border-right: 2px solid var(--brand, #145c4c);
    border-bottom: 2px solid var(--brand, #145c4c);
    transform: rotate(-45deg);
    transition: transform 0.2s ease;
    margin-left: 0.15rem;
}

.ml-branch.is-open .ml-chevron {
    transform: rotate(45deg);
}

.ml-open-link {
    border: 0;
    background: transparent;
    color: var(--brand, #145c4c);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    padding: 0.35rem 0.5rem;
}

.ml-branch-panel {
    border-top: 1px solid rgba(20, 92, 76, 0.08);
    padding: 0.75rem 0.95rem 0.95rem;
}

.ml-empty {
    margin: 0;
    padding: 0.75rem 0.85rem;
    border-radius: 0.85rem;
    background: #f5f8f6;
    color: rgba(16, 35, 31, 0.62);
}

.ml-plan-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.55rem;
}

.ml-plan {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.75rem 0.8rem;
    border-radius: 0.9rem;
    background: #f5f8f6;
    border: 1px solid rgba(20, 92, 76, 0.08);
}

.ml-plan.is-hidden {
    display: none;
}

.ml-plan-copy {
    display: grid;
    gap: 0.15rem;
    min-width: 0;
}

.ml-plan-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.ml-plan-actions .btn {
    min-height: 2.3rem;
    padding: 0.4rem 0.8rem;
}

.ml-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.ml-branch.is-filtered-out {
    display: none;
}

@media (max-width: 720px) {
    .ml-plan {
        grid-template-columns: 1fr;
    }

    .ml-plan-actions {
        width: 100%;
    }

    .ml-plan-actions .btn {
        flex: 1 1 auto;
    }
}
