/**
 * huobidaima.css — 世界各国货币代码 / 符号一览页
 * 使用位置：huobidaima.php（/huobidaima.htm）
 * 区块：说明、搜索工具条、货币表、ISO 介绍
 * 响应式：PC 五列完整表；Pad 收紧；手机 <768 隐藏数字码与国家列
 */

/* ---------- 顶部说明 ---------- */
.daima-intro {
    background: var(--slip);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem 1.2rem;
    margin-bottom: 1.25rem;
    color: var(--ink-soft);
    font-size: 0.95rem;
    line-height: 1.7;
    animation: board-in 0.45s ease both;
}

.daima-intro p {
    margin: 0;
}

/* ---------- 表区面板 ---------- */
.daima-panel {
    background: var(--slip);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.1rem 1.15rem 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 28px rgba(26, 16, 48, 0.06);
    animation: board-in 0.55s ease both;
}

.daima-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    margin-bottom: 0.5rem;
}

.daima-toolbar h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ink);
}

/* 搜索框：横排时占剩余宽度；勿用 flex-basis 固定高度（竖排会撑出大块空白） */
.daima-search {
    flex: 1 1 auto;
    min-width: 12rem;
    max-width: 360px;
    width: 100%;
}

.daima-search input {
    width: 100%;
    min-height: 44px;
    padding: 0.55rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--ink);
}

.daima-search input::placeholder {
    color: var(--steel);
    opacity: 0.8;
}

.daima-count {
    margin: 0 0 0.5rem;
    font-size: 0.85rem;
    color: var(--steel);
}

/* ---------- 表格：浅色牌价单风格 ---------- */
.daima-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.daima-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    min-width: 0;
}

.daima-table thead th {
    background: var(--slip-head);
    color: var(--ink-soft);
    font-weight: 600;
    text-align: left;
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

.daima-table tbody td {
    padding: 0.45rem 0.75rem;
    border-bottom: 1px solid rgba(26, 16, 48, 0.06);
    vertical-align: middle;
    color: var(--ink);
}

.daima-table tbody tr:last-child td {
    border-bottom: none;
}

.daima-table tbody tr:hover td {
    background: rgba(196, 59, 92, 0.04);
}

.daima-table tbody tr.is-hidden {
    display: none;
}

/* 货币名称列：国旗 + 中英文（表内紧凑，不沿用 44px 触控高度） */
.daima-name {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--ink);
    max-width: 100%;
    padding: 0.15rem 0;
}

.daima-name:hover {
    color: var(--carmine);
}

.daima-flag {
    flex: 0 0 auto;
    width: 28px;
    height: 20px;
    object-fit: cover;
    border-radius: 2px;
    border: 1px solid rgba(26, 16, 48, 0.1);
    background: var(--surface);
}

.daima-name__text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.daima-name__zh {
    font-weight: 600;
    line-height: 1.3;
}

.daima-name__en {
    font-size: 0.8rem;
    color: var(--steel);
    line-height: 1.3;
}

.daima-code {
    font-family: var(--font-data);
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--carmine-deep);
    display: inline-flex;
    align-items: center;
}

.daima-code:hover {
    color: var(--carmine);
}

/* 无本地国旗：纯文本，不加链接样式 */
.daima-name--plain {
    cursor: default;
    color: var(--ink);
}

.daima-code--plain {
    color: var(--ink-soft);
    font-weight: 600;
}

.daima-row--plain:hover td {
    background: transparent;
}

.daima-num {
    font-family: var(--font-data);
    color: var(--ink-soft);
}

.daima-symbol {
    font-family: var(--font-data);
    font-size: 1.05rem;
    white-space: nowrap;
}

.daima-region {
    color: var(--ink-soft);
}

.daima-empty {
    margin: 1rem 0 0;
    text-align: center;
    color: var(--steel);
    font-size: 0.92rem;
}

/* ---------- ISO 介绍文 ---------- */
.daima-about {
    background: var(--slip);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.2rem 1.25rem 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--ink-soft);
    font-size: 0.95rem;
    line-height: 1.75;
    animation: board-in 0.6s ease both;
}

.daima-about h2 {
    margin: 0 0 0.75rem;
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--ink);
}

.daima-about h3 {
    margin: 1.15rem 0 0.45rem;
    font-size: 1.02rem;
    color: var(--ink);
}

.daima-about p {
    margin: 0 0 0.65rem;
}

.daima-about ul {
    margin: 0.35rem 0 0.65rem;
    padding-left: 1.25rem;
}

.daima-about li {
    margin-bottom: 0.3rem;
}

/* ---------- Pad ---------- */
@media screen and (max-width: 1024px) {
    .daima-search {
        max-width: none;
    }

    .daima-table {
        font-size: 0.88rem;
    }
}

/* ---------- 手机：隐藏数字码、国家；名称更紧凑 ---------- */
@media screen and (max-width: 767px) {
    .daima-panel {
        padding: 0.95rem 0.75rem 1.1rem;
    }

    .daima-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    /* 竖排时取消横向 flex 增长，避免再撑出空白 */
    .daima-search {
        flex: none;
        min-width: 0;
        max-width: none;
    }

    .daima-toolbar h2 {
        font-size: 1.1rem;
    }

    .daima-table thead th,
    .daima-table tbody td {
        padding: 0.4rem 0.45rem;
    }

    .daima-name {
        gap: 0.4rem;
    }

    .daima-flag {
        width: 24px;
        height: 17px;
    }

    .daima-name__en {
        font-size: 0.72rem;
    }

    .daima-about {
        padding: 1rem 0.95rem 1.15rem;
    }
}
