/* Language & Currency modal (component.lang-currency) — extracted from inline <style> in body
   to satisfy HTML validation (a <style> element must live in <head>, not <body>). */
.lc-modal-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    height: 32px;
    font-size: 14px;
    background: transparent;
    cursor: pointer;
    background-color: #282b31;
    color: var(--primary-color) !important;
    flex-wrap: nowrap;
    justify-content: center;
    font-weight: 500;
    font-size: 14px;
    box-sizing: border-box;
    border-radius: 2px 2px 2px 2px;
}

.lc-modal-trigger:hover {
    background: var(--primary-color);
    color: #000 !important;
}

/* 移动端（国旗 + 货币 + 箭头）默认不显示， */
.lc-trigger__flag,
.lc-trigger__mb,
.lc-trigger__caret {
    display: none;
}

@media (max-width: 1024px) {
    .lc-modal-trigger {
        gap: 6px;
        padding: 0 8px;
    }

    .lc-modal-trigger .lc-trigger__pc {
        display: none;
    }

    .lc-trigger__flag {
        display: block;
        flex: 0 0 18px;
        width: 18px;
        height: 18px;
        border-radius: 50%;
        overflow: hidden;
    }

    .lc-trigger__mb {
        display: inline;
        font-weight: 700;
    }

    /* 和弹窗里的 .lc-dropdown__caret 同一套画法，用 currentColor 跟着按钮主题色 */
    .lc-trigger__caret {
        display: block;
        width: 0;
        height: 0;
        border-left: 4px solid transparent;
        border-right: 4px solid transparent;
        border-top: 5px solid currentColor;
    }
}

.lc-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    --lc-modal-top: 20%;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}

.lc-modal.show {
    display: flex;
}

.lc-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .55);
}

.lc-modal__dialog {
    position: relative;
    width: 360px;
    max-width: calc(100vw - 32px);
    top: var(--lc-modal-top);
    padding: 28px 24px 24px;
    background: #fff;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .3);
}

.lc-modal__close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 32px;
    height: 32px;
    font-size: 22px;
    line-height: 1;
    color: #999;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.lc-modal__close:hover {
    color: #333;
}

.lc-modal__title {
    margin: 0 0 20px;
    font-size: 18px;
    font-weight: 700;
    color: #1d2025;
    text-align: center;
}

.lc-modal__field {
    margin-bottom: 16px;
}

.lc-modal__label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: #666;
}

.lc-modal__select {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    font-size: 14px;
    color: #1d2025;
    background: #fff;
    border: 1px solid #d5d9e0;
    border-radius: 6px;
    outline: none;
    cursor: pointer;
}

.lc-modal__select:focus {
    border-color: var(--primary-color);
}

.lc-dropdown {
    position: relative;
}

.lc-dropdown__value {
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    font: inherit;
    cursor: pointer;
}

.lc-dropdown__caret {
    margin-left: auto;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #666;
    transition: transform .15s;
}

.lc-dropdown.open .lc-dropdown__caret {
    transform: rotate(180deg);
}

.lc-dropdown__list {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 10;
    max-height: 220px;
    overflow-y: auto;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: #fff;
    border: 1px solid #d5d9e0;
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .12);
}

.lc-dropdown.open .lc-dropdown__list {
    display: block;
}

.lc-dropdown__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    font-size: 14px;
    color: #1d2025;
    border-radius: 5px;
    cursor: pointer;
}

.lc-dropdown__item:hover {
    background: #f2f4f7;
}

.lc-dropdown__item.active {
    color: var(--primary-color);
    font-weight: 700;
}

.lc-dropdown__flag {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    overflow: hidden;
}

.lc-dropdown__symbol {
    flex: 0 0 20px;
    width: 20px;
    text-align: center;
    font-weight: 700;
    color: #666;
}

.lc-modal__confirm {
    display: block;
    width: 100%;
    height: 44px;
    margin-top: 22px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    background: var(--primary-color);
    border: 0;
    border-radius: 6px;
    cursor: pointer;
}

.lc-modal__confirm:hover {
    filter: brightness(1.05);
}
