/* Fees & limits page — depends on home-welcome.css tokens and front-pages.css layout. */

#networks,
#faq,
#fee-example {
    /* Clears the sticky header when an anchor jumps here. */
    scroll-margin-top: 80px;
}

/* ---------- Hero fee card ---------- */
.fee-headline {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(243, 186, 47, .08), rgba(232, 163, 23, .04));
    padding: 1.75rem 1.65rem;
    box-shadow: 0 30px 80px -40px rgba(0, 0, 0, .8);
}

.fee-headline-label {
    display: block;
    font-size: .72rem;
    letter-spacing: .18em;
    color: var(--ink-2);
    margin-bottom: .55rem;
}

.fee-headline-value {
    display: flex;
    align-items: baseline;
    gap: .5rem;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(2.6rem, 6vw, 3.6rem);
    line-height: 1;
    margin-bottom: .85rem;
}

.fee-headline-note {
    color: var(--ink-1);
    font-size: .86rem;
    line-height: 1.6;
}

.fee-headline-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--line);
}

.fee-headline-num {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--ink-0);
}

.fee-headline-cap {
    display: block;
    font-size: .72rem;
    color: var(--ink-2);
    line-height: 1.35;
}

/* ---------- Worked example ---------- */
.fee-example-card {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, .018);
    padding: 1.5rem 1.6rem;
    height: 100%;
}

.fee-example-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
    margin-bottom: .5rem;
}

.fee-example-tag {
    font-size: 1rem;
    font-weight: 600;
    color: var(--ink-0);
}

.fee-example-rate {
    border: 1px solid var(--line);
    border-radius: 100px;
    padding: .25rem .7rem;
    font-size: .76rem;
    color: var(--gold);
    background: var(--grad-soft);
    white-space: nowrap;
}

.fee-example-rows {
    list-style: none;
    margin: 0 0 1.1rem;
    padding: 0;
}

.fee-example-rows li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .7rem 0;
    font-size: .89rem;
    color: var(--ink-1);
    border-bottom: 1px solid var(--line-soft);
}

.fee-example-rows li span:last-child {
    color: var(--ink-0);
    white-space: nowrap;
}

.fee-example-rows li.is-total {
    border-bottom: none;
    padding-bottom: 0;
}

.fee-example-rows li.is-total span:first-child {
    color: var(--ink-0);
    font-weight: 600;
}

.fee-example-rows li.is-total span:last-child {
    font-weight: 700;
    color: var(--gold);
}

.fee-example-note {
    font-size: .82rem;
    color: var(--ink-2);
    line-height: 1.6;
}

/* ---------- Coin / network accordion ---------- */
.fee-coin-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: start;
}

@media (min-width: 992px) {
    .fee-coin-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.fee-coin-card {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, .018);
    overflow: hidden;
    transition: border-color .25s ease, background .25s ease;
}

.fee-coin-card:hover,
.fee-coin-card.is-open {
    border-color: rgba(255, 255, 255, .2);
    background: rgba(255, 255, 255, .03);
}

.fee-coin-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: 1.05rem 1.2rem;
    background: transparent;
    border: none;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.fee-coin-toggle:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: -2px;
}

.fee-coin-avatar {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--grad-soft);
    border: 1px solid var(--line);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: .85rem;
    color: var(--ink-0);
}

.fee-coin-id {
    display: flex;
    flex-direction: column;
    gap: .18rem;
    min-width: 0;
    flex: 1 1 auto;
}

.fee-coin-name {
    font-size: .95rem;
    font-weight: 600;
    color: var(--ink-0);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fee-coin-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: .72rem;
    color: var(--ink-2);
    line-height: 1.2;
    white-space: nowrap;
}

.fee-coin-count {
    flex: 0 0 auto;
    border-radius: 100px;
    padding: .28rem .7rem;
    font-size: .72rem;
    font-weight: 600;
    color: #0d0d0d;
    background: var(--grad);
    white-space: nowrap;
}

.fee-coin-chevron {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .04);
    color: var(--ink-1);
    font-size: .78rem;
    transition: transform .25s ease;
}

.fee-coin-card.is-open .fee-coin-chevron {
    transform: rotate(180deg);
    color: var(--gold);
}

.fee-coin-body {
    display: grid;
    grid-template-rows: 0fr;
    border-top: 1px solid transparent;
    transition:
        grid-template-rows .32s ease,
        border-color .32s ease;
}

.fee-coin-body-inner {
    overflow: hidden;
    min-height: 0;
    opacity: 0;
    transform: translateY(-4px);
    transition:
        opacity .28s ease,
        transform .28s ease;
}

.fee-coin-card.is-open .fee-coin-body {
    grid-template-rows: 1fr;
    border-top-color: var(--line);
}

.fee-coin-card.is-open .fee-coin-body-inner {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .fee-coin-body,
    .fee-coin-body-inner,
    .fee-coin-chevron {
        transition: none;
    }
}

.fee-table-scroll {
    overflow-x: auto;
}

.fee-table {
    width: 100%;
    min-width: 420px;
    border-collapse: collapse;
    margin: 0;
}

.fee-table thead th {
    font-family: 'JetBrains Mono', monospace;
    font-size: .68rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink-2);
    font-weight: 500;
    padding: .7rem 1.2rem;
    background: rgba(255, 255, 255, .02);
    white-space: nowrap;
    text-align: left;
}

.fee-table tbody th,
.fee-table tbody td {
    padding: .8rem 1.2rem;
    font-size: .84rem;
    color: var(--ink-1);
    border-top: 1px solid var(--line-soft);
    white-space: nowrap;
    font-weight: 400;
    text-align: left;
}

.fee-table tbody tr:hover th,
.fee-table tbody tr:hover td {
    background: rgba(255, 255, 255, .02);
}

.fee-net {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}

.fee-net-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--success);
    box-shadow: 0 0 8px rgba(0, 230, 118, .8);
}

.fee-net-icon {
    border-radius: 50%;
    flex-shrink: 0;
}

.fee-net-label {
    color: var(--ink-0);
    font-weight: 500;
}

.fee-net-code {
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: .1rem .35rem;
    font-size: .64rem;
    color: var(--ink-2);
}

/* ---------- Empty state ---------- */
.fee-empty {
    border: 1px dashed var(--line);
    border-radius: 16px;
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .75rem;
    text-align: center;
    color: var(--ink-1);
    font-size: .9rem;
}

.fee-empty i {
    font-size: 1.75rem;
    color: var(--gold);
}

@media (max-width: 991.98px) {
    /* front-pages.css centers .page-hero on mobile — follow it here. */
    .fee-headline {
        padding: 1.4rem 1.25rem;
    }

    .fee-headline-value {
        justify-content: center;
    }
}

@media (max-width: 575.98px) {
    .fee-coin-toggle {
        gap: .7rem;
        padding: .95rem 1rem;
    }

    .fee-coin-id {
        flex: 1 1 auto;
        min-width: 0;
    }

    .fee-coin-count {
        flex-shrink: 0;
        padding: .24rem .55rem;
        font-size: .68rem;
    }

    .fee-example-card {
        padding: 1.2rem 1.1rem;
    }
}
