/* ========================================
   LemonSelect 组件样式（自动适配版）
   ======================================== */

/* ----- 触发器（通用） ----- */
.lemon-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border: 1.5px solid #E8E0D8;
    border-radius: 12px;
    background: #FFFFFF;
    font-size: 15px;
    color: #2D2D2D;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
    min-height: 44px;
}

.lemon-select-trigger:active {
    border-color: #F9A826;
    box-shadow: 0 0 0 3px rgba(249, 168, 38, 0.12);
}

.lemon-select-trigger .ls-value {
    flex: 1;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lemon-select-trigger .ls-arrow {
    color: #aaa;
    font-size: 14px;
    margin-left: 10px;
    transition: transform 0.25s;
    flex-shrink: 0;
}

.lemon-select-trigger .ls-arrow.open {
    transform: rotate(180deg);
}

/* ===== 移动端：遮罩层 ===== */
.lemon-select-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.35);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}
.lemon-select-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ===== 移动端：底部面板 ===== */
.lemon-select-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #FFFFFF;
    border-radius: 24px 24px 0 0;
    z-index: 10000;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.08);
    max-height: 60vh;
    display: flex;
    flex-direction: column;
}
.lemon-select-sheet.active {
    transform: translateY(0);
}

.lemon-select-sheet .ls-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px 14px 20px;
    border-bottom: 1px solid #F0EDE8;
    flex-shrink: 0;
}
.lemon-select-sheet .ls-title {
    font-size: 17px;
    font-weight: 600;
    color: #2D2D2D;
}
.lemon-select-sheet .ls-close-btn {
    background: none;
    border: none;
    font-size: 22px;
    color: #aaa;
    cursor: pointer;
    padding: 4px 8px;
    -webkit-tap-highlight-color: transparent;
    font-family: inherit;
}
.lemon-select-sheet .ls-option-list {
    padding: 8px 8px 20px 8px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
}
.lemon-select-sheet .ls-option {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-radius: 14px;
    font-size: 16px;
    color: #2D2D2D;
    cursor: pointer;
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.lemon-select-sheet .ls-option:active {
    background: #F5F2ED;
}
.lemon-select-sheet .ls-option .ls-check {
    margin-left: auto;
    color: #F9A826;
    font-weight: 700;
    opacity: 0;
    transition: opacity 0.15s;
}
.lemon-select-sheet .ls-option.selected .ls-check {
    opacity: 1;
}
.lemon-select-sheet .ls-option.selected {
    background: #FFF8ED;
    font-weight: 500;
}

/* ===== 桌面端：内联下拉列表 ===== */
.lemon-select-dropdown {
    position: absolute;
    z-index: 9998;
    background: #FFFFFF;
    border: 1px solid #E8E0D8;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.10);
    max-height: 240px;
    overflow-y: auto;
    padding: 6px 0;
    min-width: 140px;
    margin-top: 4px;
}
.lemon-select-dropdown .ls-dropdown-item {
    padding: 10px 16px;
    font-size: 14px;
    color: #2D2D2D;
    cursor: pointer;
    transition: background 0.12s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lemon-select-dropdown .ls-dropdown-item:hover {
    background: #F5F2ED;
}
.lemon-select-dropdown .ls-dropdown-item.selected {
    background: #FFF8ED;
    font-weight: 500;
    color: #F9A826;
}

/* ===== 安全区域适配（iPhone刘海屏） ===== */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .lemon-select-sheet {
        padding-bottom: env(safe-area-inset-bottom);
    }
}