/**
 * Copyright (C) AltCoinTrader (Pty) Ltd. - All Rights Reserved
 * Trading Fees page (v2 redesign)
 *
 * Standalone stylesheet linked from /trading-fees.php with filemtime cache
 * busting so the compiled CSS bundle does not need to be recompiled.
 */

.fees-v2 {
    --fees-bg: #ffffff;
    --fees-border: #e9eaeb;          /* gray-200 */
    --fees-divider: #e9eaeb;
    --fees-text: #181d27;            /* gray-900 */
    --fees-text-muted: #535862;      /* gray-600 */
    --fees-text-quaternary: #717680; /* gray-500 */
    --fees-stripe: #fafafa;          /* gray-50  */
    --fees-tier-bg: #fcfcfd;         /* gray-25  */
    --fees-badge-bg: #f5f5f5;        /* gray-100 */
    --fees-badge-border: #e9eaeb;
    --fees-badge-text: #414651;      /* gray-700 */
    --fees-radius: 16px;

    max-width: 1152px;
    margin: 0 auto;
    padding: 24px 16px 64px;
    color: var(--fees-text);
}

/* ----- Page title ----------------------------------------------------- */

.fees-v2 .fees-page-title {
    font-size: 36px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--fees-text);
    margin: 0 0 12px;
    padding: 0;
}

.fees-v2 .fees-page-rule {
    border: 0;
    border-top: 1px solid var(--fees-divider);
    margin: 0 0 32px;
}

/* ----- Section card --------------------------------------------------- */

.fees-v2 .fees-card {
    background: var(--fees-bg);
    border: 1px solid var(--fees-border);
    border-radius: var(--fees-radius);
    padding: 32px 40px;
    margin-bottom: 40px;
}

.fees-v2 .fees-card:last-child {
    margin-bottom: 0;
}

.fees-v2 .fees-card__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--fees-divider);
    margin-bottom: 16px;
}

.fees-v2 .fees-card__title {
    font-size: 20px;
    font-weight: 600;
    color: var(--fees-text);
    margin: 0;
    padding: 0;
}

.fees-v2 .fees-card__desc {
    font-size: 14px;
    line-height: 1.5;
    color: var(--fees-text-muted);
    margin: 0 0 24px;
}

.fees-v2 .fees-alert {
    color: #b42318;
    background: #fef3f2;
    border: 1px solid #fecdca;
    border-radius: 8px;
    padding: 12px 16px;
    text-align: center;
}

/* ----- Desktop tables ------------------------------------------------- */

.fees-v2 .fees-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.fees-v2 .fees-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.fees-v2 .fees-table thead th {
    text-align: left;
    font-weight: 600;
    color: var(--fees-text-muted);
    padding: 12px 16px;
    border-bottom: 1px solid var(--fees-divider);
    white-space: nowrap;
}

.fees-v2 .fees-table tbody td {
    padding: 16px;
    color: var(--fees-text);
    vertical-align: top;
    line-height: 1.5;
}

.fees-v2 .fees-table tbody tr:nth-child(even) {
    background: var(--fees-stripe);
}

.fees-v2 .fees-table .fees-col-num {
    text-align: right;
    white-space: nowrap;
}

.fees-v2 .fees-table th.fees-col-num {
    text-align: right;
}

.fees-v2 .fees-table .fees-coin {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
}

.fees-v2 .fees-coin-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    flex: 0 0 22px;
    object-fit: contain;
}

.fees-v2 .fees-link {
    color: inherit;
    text-decoration: none;
}

.fees-v2 .fees-link:hover {
    text-decoration: underline;
}

/* Withdraw-fee network lines + dynamic-fee badge */

.fees-v2 .fees-net-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
}

.fees-v2 .fees-net-line:last-child {
    margin-bottom: 0;
}

.fees-v2 .fees-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    color: var(--fees-badge-text);
    background: var(--fees-badge-bg);
    border: 1px solid var(--fees-badge-border);
    border-radius: 999px;
    padding: 4px 10px;
    white-space: nowrap;
}

/* ----- Search box ----------------------------------------------------- */

.fees-v2 .fees-search {
    position: relative;
    width: 260px;
    max-width: 100%;
}

.fees-v2 .fees-search .fas {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    color: var(--fees-text-quaternary);
    pointer-events: none;
    font-size: 14px;
}

.fees-v2 .fees-search input {
    width: 100%;
    height: 40px;
    border: 1px solid var(--fees-border);
    border-radius: 8px;
    background: var(--fees-bg);
    color: var(--fees-text);
    padding: 0 14px 0 38px;
    font-size: 14px;
    outline: none;
}

.fees-v2 .fees-search input:focus {
    border-color: var(--primary, #226db6);
}

.fees-v2 .fees-search input::placeholder {
    color: var(--fees-text-quaternary);
}

/* ----- Mobile tier cards (Trading Fees) ------------------------------- */

.fees-v2 .fees-tier-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fees-v2 .fees-tier-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: var(--fees-tier-bg);
    border: 1px solid var(--fees-border);
    border-radius: 8px;
    padding: 16px;
}

.fees-v2 .fees-tier-card__label {
    font-size: 13px;
    color: var(--fees-text-quaternary);
    margin-bottom: 4px;
}

.fees-v2 .fees-tier-card__amount {
    font-size: 15px;
    font-weight: 600;
    color: var(--fees-text);
}

.fees-v2 .fees-tier-card__right {
    display: flex;
    gap: 20px;
    text-align: right;
    flex: 0 0 auto;
}

.fees-v2 .fees-mt__label {
    display: block;
    font-size: 12px;
    color: var(--fees-text-quaternary);
    margin-bottom: 4px;
}

.fees-v2 .fees-mt__val {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--fees-text);
}

/* ----- Mobile accordion (FIAT + Crypto) ------------------------------- */

.fees-v2 .fees-accordion {
    border-top: 1px solid var(--fees-divider);
}

.fees-v2 .fees-accordion__item {
    border-bottom: 1px solid var(--fees-divider);
}

.fees-v2 .fees-accordion__head {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: none;
    border: 0;
    padding: 14px 4px;
    cursor: pointer;
    text-align: left;
    color: var(--fees-text);
}

.fees-v2 .fees-accordion__title {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.fees-v2 .fees-accordion__ticker {
    font-size: 15px;
    font-weight: 600;
}

.fees-v2 .fees-accordion__name {
    font-size: 13px;
    color: var(--fees-text-quaternary);
}

.fees-v2 .fees-accordion__chevron {
    margin-left: auto;
    color: var(--fees-text-quaternary);
    transition: transform 0.2s ease;
    flex: 0 0 auto;
}

.fees-v2 .fees-accordion__item.is-open .fees-accordion__chevron {
    transform: rotate(180deg);
}

.fees-v2 .fees-accordion__body {
    display: none;
    padding: 4px 4px 16px;
}

.fees-v2 .fees-accordion__item.is-open .fees-accordion__body {
    display: block;
}

.fees-v2 .fees-detail {
    margin-bottom: 14px;
}

.fees-v2 .fees-detail:last-child {
    margin-bottom: 0;
}

.fees-v2 .fees-detail__label {
    font-size: 12px;
    color: var(--fees-text-quaternary);
    margin-bottom: 4px;
}

.fees-v2 .fees-detail__value {
    font-size: 14px;
    color: var(--fees-text);
    line-height: 1.5;
}

/* ----- Responsive switch (Bootstrap lg = 992px) ----------------------- */

@media (max-width: 991.98px) {
    .fees-v2 {
        padding: 16px 12px 48px;
    }

    .fees-v2 .fees-page-title {
        font-size: 26px;
    }

    .fees-v2 .fees-card {
        padding: 20px 16px;
        margin-bottom: 16px;
    }

    .fees-v2 .fees-card__head {
        flex-direction: column;
        align-items: stretch;
    }

    .fees-v2 .fees-card__title {
        font-size: 18px;
    }

    .fees-v2 .fees-search {
        width: 100%;
        margin-bottom: 8px;
    }
}

/* ----- Dark theme ----------------------------------------------------- */

body[data-theme='dark'] .fees-v2 {
    --fees-bg: #0a0f13;              /* dark-gray-800 */
    --fees-border: #1f2730;
    --fees-divider: #1f2730;
    --fees-text: #f7f7f7;            /* gray-50 (dark) */
    --fees-text-muted: #cecfd2;      /* gray-300 (dark) */
    --fees-text-quaternary: #85888e; /* gray-500 (dark) */
    --fees-stripe: #11161c;
    --fees-tier-bg: #11161c;
    --fees-badge-bg: #182530;        /* dark-gray-500 */
    --fees-badge-border: #2a333d;
    --fees-badge-text: #e8e9ea;
}
