/* 货币对列表样式 */
.currency-list .currency-item {
    /* 移动端：一行三个 */
    width: 33.333333%;
    padding: 12px 0;
    border-bottom: 1px solid #99a1af;
    box-sizing: border-box;
    font-size: 12px;
}

/* PC端：一行四个 */
@media (min-width: 768px) {
    .currency-list .currency-item {
        width: 30%;
        padding: 30px 0 10px;
        font-size: 16px;
    }
}

/* 移动端对齐方式 */
.currency-list .currency-item:nth-child(3n+1) {
    text-align: left;
}

.currency-list .currency-item:nth-child(3n+2) {
    text-align: center;
}

.currency-list .currency-item:nth-child(3n) {
    text-align: right;
}

/* PC端对齐方式（覆盖移动端） */
@media (min-width: 768px) {
    .currency-list .currency-item:nth-child(4n+1) {
        text-align: left;
        width: 20%;
    }

    .currency-list .currency-item:nth-child(4n+2),
    .currency-list .currency-item:nth-child(4n+3) {
        text-align: center;
    }

    .currency-list .currency-item:nth-child(4n) {
        text-align: right;
        width: 20%;
    }
}

/* 折叠/展开动画：用 max-height 平滑过渡，避免高度闪动 */
.currency-list {
    overflow: hidden;
    transition: max-height 0.6s ease-in-out;
}

/* 折叠态：max-height 在 JS 中按 12 个元素高度计算 */
.currency-list.collapsed {
    max-height: var(--currency-collapsed-height, 0px);
}

/* 展开态：max-height 在 JS 中设为 scrollHeight */
.currency-list.expanded {
    max-height: var(--currency-expanded-height, 9999px);
    /* 展开时父级加底边，确保最后一行不满时也有完整底线 */
    border-bottom: 1px solid #99a1af;
}

/* 最后一行不画 item 的底部边框，交给父元素统一画一条线 */
/* 移动端：一行 3 个 → 最后三个不画底边 */
@media (max-width: 767px) {
    .currency-list .currency-item:nth-last-child(-n+1) {
        border-bottom: none;
    }
}

/* PC 端：一行 4 个 → 最后四个不画底边 */
@media (min-width: 768px) {
    .currency-list .currency-item:nth-last-child(-n+2) {
        border-bottom: none;
    }
}