/* ==================== 货主/店铺选择弹窗组件样式 ==================== */

/* 引入Font Awesome图标库 */
@import url('Awesome.css');

/* 货主/店铺选择弹窗基础样式 */
.owner-shop-selection-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100001;
    animation: oss-modal-appear 0.3s ease-out;
}

@keyframes oss-modal-appear {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.owner-shop-selection-overlay.oss-active {
    display: flex;
}

.owner-shop-selection-modal .oss-modal-container {
    width: 96vw;
    max-width: 1200px;
    height: 90vh;
    max-height: 850px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: oss-modal-slide-in 0.3s ease-out;
}

/* 单选模式下适当收窄弹窗宽度 */
.owner-shop-selection-modal.oss-single-mode .oss-modal-container {
    width: 88vw;
    max-width: 920px;
}

/* 双列表模式下的特殊布局 */
.owner-shop-selection-modal.oss-dual-list-mode .oss-modal-container {
    max-width: 1200px;
}

/* 货主/店铺共同显示模式 - 确保双列表容器可见 */
.owner-shop-selection-modal.oss-dual-list-mode .oss-dual-list-container {
    display: flex !important;
    flex: 1;
    flex-direction: row;
    overflow: hidden;
}

.owner-shop-selection-modal.oss-dual-list-mode .oss-tab-container {
    display: none; /* 隐藏标签，因为是同时显示 */
}

.owner-shop-selection-modal.oss-dual-list-mode .oss-dual-list-content {
    display: flex !important;
    flex: 1;
    flex-direction: row;
    height: 100%;
}

.owner-shop-selection-modal.oss-dual-list-mode .oss-owner-list-container,
.owner-shop-selection-modal.oss-dual-list-mode .oss-shop-list-container {
    flex: 1;
    display: flex !important;
    flex-direction: column;
    height: 100%;
}

.owner-shop-selection-modal.oss-dual-list-mode .oss-owner-list-container {
    border-right: 1px solid #e7e7e7;
}

/* 双列表模式下的左侧面板调整 */
.owner-shop-selection-modal.oss-dual-list-mode .oss-list-panel {
    flex: 1;
    display: flex !important;
    flex-direction: column;
    border-right: none;
    background-color: #fff;
}

/* 单选模式样式 */
.owner-shop-selection-modal.oss-single-mode .oss-list-panel {
    flex: 1;
    display: flex !important;
    flex-direction: column;
    border-right: none;
    background-color: #fff;
}

.owner-shop-selection-modal.oss-single-mode .oss-selected-panel {
    display: none !important;
}

@keyframes oss-modal-slide-in {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 头部区域 */
.owner-shop-selection-modal .oss-modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid #e7e7e7;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
    flex-shrink: 0;
}

.owner-shop-selection-modal .oss-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #1d2129;
    display: flex;
    align-items: center;
    gap: 8px;
}

.owner-shop-selection-modal .oss-close-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #86909c;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.owner-shop-selection-modal .oss-close-btn:hover {
    background-color: #f2f3f5;
    color: #1d2129;
}

/* 主体区域 */
.owner-shop-selection-modal .oss-modal-body {
    display: flex;
    flex: 1;
    overflow: hidden;
    background: linear-gradient(135deg, #fafafa 0%, #fff 100%);
}

/* 左侧面板 - 列表区域 */
.owner-shop-selection-modal .oss-list-panel {
    flex: 4;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e7e7e7;
    background-color: #fff;
}





/* 右侧面板 - 已选列表 */
.owner-shop-selection-modal .oss-selected-panel {
    flex: 0 0 280px;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    background-color: #fff;
}

/* 面板头部 */
.owner-shop-selection-modal .oss-panel-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e7e7e7;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background-color: #fafafa;
    flex-shrink: 0;
}

.owner-shop-selection-modal .oss-panel-title {
    font-size: 16px;
    font-weight: 600;
    color: #1d2129;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 搜索框 */
.owner-shop-selection-modal .oss-search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.owner-shop-selection-modal .oss-search-input {
    flex: 1;
    padding: 8px 12px 8px 36px;
    border: 1px solid #dcdcdc;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
    background-color: #fff;
}

.owner-shop-selection-modal .oss-search-input:focus {
    border-color: #0052d9;
    box-shadow: 0 0 0 3px rgba(0, 82, 217, 0.1);
}

.owner-shop-selection-modal .oss-search-icon {
    position: absolute;
    left: 12px;
    color: #86909c;
    font-size: 14px;
}

/* 面板内容区 */
.owner-shop-selection-modal .oss-panel-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: #fff;
}

/* 列表容器 - 固定高度，不随数据调整 */
.owner-shop-selection-modal .oss-list-container {
    height: 500px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #c9cdd4 #f2f3f5;
}

/* 双列表和单列表使用一致的固定高度 */
.owner-shop-selection-modal.oss-dual-list-mode .oss-list-container {
    height: 500px;
}

.owner-shop-selection-modal .oss-list-container::-webkit-scrollbar {
    width: 6px;
}

.owner-shop-selection-modal .oss-list-container::-webkit-scrollbar-track {
    background: #f2f3f5;
    border-radius: 3px;
}

.owner-shop-selection-modal .oss-list-container::-webkit-scrollbar-thumb {
    background: #c9cdd4;
    border-radius: 3px;
}

.owner-shop-selection-modal .oss-list-container::-webkit-scrollbar-thumb:hover {
    background: #86909c;
}

/* 货主列表头部 */
.owner-shop-selection-modal .oss-owner-list-header {
    display: grid;
    grid-template-columns: 1fr 2fr 1.5fr 1fr 1.2fr;
    padding: 10px 16px;
    font-size: 12px;
    color: #86909c;
    border-bottom: 1px solid #e7e7e7;
    background-color: #fafafa;
    position: sticky;
    top: 0;
    z-index: 10;
    gap: 8px;
}

/* 店铺列表头部 */
.owner-shop-selection-modal .oss-shop-list-header {
    display: grid;
    grid-template-columns: 1fr 2fr 1.5fr 1.2fr;
    padding: 10px 16px;
    font-size: 12px;
    color: #86909c;
    border-bottom: 1px solid #e7e7e7;
    background-color: #fafafa;
    position: sticky;
    top: 0;
    z-index: 10;
    gap: 8px;
}

/* 货主列表项 */
.owner-shop-selection-modal .oss-owner-list-item {
    display: grid;
    grid-template-columns: 1fr 2fr 1.5fr 1fr 1.2fr;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.3s;
    align-items: center;
    border-bottom: 1px solid #f6f6f6;
    position: relative;
    gap: 8px;
}

/* 店铺列表项 */
.owner-shop-selection-modal .oss-shop-list-item {
    display: grid;
    grid-template-columns: 1fr 2fr 1.5fr 1.2fr;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.3s;
    align-items: center;
    border-bottom: 1px solid #f6f6f6;
    position: relative;
    gap: 8px;
}

.owner-shop-selection-modal .oss-owner-list-item:hover,
.owner-shop-selection-modal .oss-shop-list-item:hover {
    background-color: #f8f9fa;
}

.owner-shop-selection-modal .oss-owner-list-item.oss-selected,
.owner-shop-selection-modal .oss-shop-list-item.oss-selected {
    background-color: #ecf2fe;
    border-left: 3px solid #0052d9;
}

.owner-shop-selection-modal .oss-item-field {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    color: #4e5969;
}

/* 联系电话列内容居中 */
.owner-shop-selection-modal .oss-owner-list-header .oss-item-field:nth-child(3),
.owner-shop-selection-modal .oss-owner-list-item .oss-item-field:nth-child(3) {
    text-align: center;
}

/* 店铺数量列内容居中 */
.owner-shop-selection-modal .oss-owner-list-header .oss-item-field:nth-child(4),
.owner-shop-selection-modal .oss-owner-list-item .oss-item-field:nth-child(4) {
    text-align: center;
}

.owner-shop-selection-modal .oss-item-field.oss-item-code {
    font-weight: 500;
    color: #1d2129;
}

.owner-shop-selection-modal .oss-item-field.oss-item-name {
    font-weight: 600;
    color: #1d2129;
}

/* 空状态 */
.owner-shop-selection-modal .oss-empty-state {
    padding: 60px 20px;
    text-align: center;
    color: #86909c;
}

.owner-shop-selection-modal .oss-empty-state .oss-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    display: block;
    color: #c9cdd4;
    opacity: 0.7;
}

/* 分页 - 使用更强的选择器以避免冲突 */
#owner-shop-selection-overlay .oss-pagination-container,
.owner-shop-selection-modal[data-owner-shop-modal="true"] .oss-pagination-container,
.owner-shop-pagination-container {
    padding: 12px 20px;
    border-top: 1px solid #e7e7e7;
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    z-index: 20;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    flex-direction: row !important;
}

.owner-shop-selection-modal .oss-pagination-info {
    font-size: 13px;
    color: #86909c;
}

.owner-shop-selection-modal .oss-pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.owner-shop-selection-modal .oss-pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid #dcdcdc;
    border-radius: 6px;
    background-color: #fff;
    color: #4e5969;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 13px;
}

.owner-shop-selection-modal .oss-pagination-btn:hover:not(:disabled) {
    border-color: #0052d9;
    color: #0052d9;
}

.owner-shop-selection-modal .oss-pagination-btn:disabled,
.owner-shop-selection-modal .oss-pagination-btn.disabled {
    color: #c9cdd4;
    cursor: not-allowed;
    pointer-events: none;
}

.owner-shop-selection-modal .oss-pagination-btn.oss-active {
    background-color: #0052d9;
    color: #fff;
    border-color: #0052d9;
}

/* 已选列表项 */
.owner-shop-selection-modal .oss-selected-list-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s;
}

.owner-shop-selection-modal .oss-selected-list-item:hover {
    background-color: #f8f9fa;
}

.owner-shop-selection-modal .oss-selected-item-info {
    flex: 1;
    overflow: hidden;
}

.owner-shop-selection-modal .oss-selected-item-name {
    font-weight: 500;
    color: #1d2129;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.owner-shop-selection-modal .oss-selected-item-code {
    color: #86909c;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.owner-shop-selection-modal .oss-selected-item-type {
    display: inline-block;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 4px;
    background-color: #f0f0f0;
    color: #666;
}

.owner-shop-selection-modal .oss-selected-item-type.owner {
    background-color: #e6f7ff;
    color: #0050b3;
}

.owner-shop-selection-modal .oss-selected-item-type.shop {
    background-color: #f6ffed;
    color: #389e0d;
}

.owner-shop-selection-modal .oss-remove-btn {
    background: none;
    border: none;
    color: #ff4d4f;
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.owner-shop-selection-modal .oss-remove-btn:hover {
    background-color: #fff2f0;
}

/* 底部操作区 */
.owner-shop-selection-modal .oss-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e7e7e7;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
    flex-shrink: 0;
}

.owner-shop-selection-modal .oss-selection-info {
    font-size: 14px;
    color: #4e5969;
    flex: 1;
}

.owner-shop-selection-modal .oss-selection-info strong {
    color: #0052d9;
    font-weight: 600;
}

.owner-shop-selection-modal .oss-action-buttons {
    display: flex;
    gap: 12px;
}

.owner-shop-selection-modal .oss-btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid transparent;
    font-weight: 600;
    min-width: 100px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.owner-shop-selection-modal .oss-btn-cancel {
    background-color: white;
    border: 1px solid #dcdcdc;
    color: #4e5969;
}

.owner-shop-selection-modal .oss-btn-cancel:hover {
    border-color: #0052d9;
    color: #0052d9;
}

.owner-shop-selection-modal .oss-btn-confirm {
    background-color: #0052d9;
    color: white;
    border: 1px solid #0052d9;
}

.owner-shop-selection-modal .oss-btn-confirm:hover:not(:disabled) {
    background-color: #1e6fff;
    border-color: #1e6fff;
}

.owner-shop-selection-modal .oss-btn-confirm:disabled {
    background-color: #f2f3f5;
    color: #c9cdd4;
    border-color: #f2f3f5;
    cursor: not-allowed;
}

/* 响应式设计 */
@media (max-width: 1400px) {
    .owner-shop-selection-modal .oss-owner-list-header,
    .owner-shop-selection-modal .oss-owner-list-item {
        grid-template-columns: 1fr 2fr 1.5fr 1fr;
    }
    
    .owner-shop-selection-modal .oss-shop-list-header,
    .owner-shop-selection-modal .oss-shop-list-item {
        grid-template-columns: 1fr 2fr 1.5fr;
    }
    
    /* 隐藏最后一列 */
    .owner-shop-selection-modal .oss-item-field:last-child {
        display: none;
    }
}

@media (max-width: 992px) {
    .owner-shop-selection-modal .oss-owner-list-header,
    .owner-shop-selection-modal .oss-owner-list-item {
        grid-template-columns: 1fr 2fr 1.5fr;
    }
    
    .owner-shop-selection-modal .oss-shop-list-header,
    .owner-shop-selection-modal .oss-shop-list-item {
        grid-template-columns: 1fr 2fr;
    }
    
    /* 隐藏最后两列 */
    .owner-shop-selection-modal .oss-item-field:nth-child(n+4) {
        display: none;
    }
}

@media (max-width: 768px) {
    .owner-shop-selection-modal .oss-modal-container {
        width: 98%;
        height: 95vh;
        max-height: none;
        border-radius: 0;
        margin: 10px;
    }
    
    .owner-shop-selection-modal .oss-modal-body {
        flex-direction: column;
        height: auto;
    }
    
    .owner-shop-selection-modal .oss-list-panel {
        border-right: none;
        border-bottom: 1px solid #e7e7e7;
        min-height: 300px;
    }
    
    .owner-shop-selection-modal .oss-dual-list-mode .oss-dual-list-container {
        flex-direction: column;
    }
    
    .owner-shop-selection-modal .oss-dual-list-mode .oss-owner-list-container {
        border-right: none;
        border-bottom: 1px solid #e7e7e7;
    }
    
    .owner-shop-selection-modal .oss-owner-list-header,
    .owner-shop-selection-modal .oss-owner-list-item {
        grid-template-columns: 1fr 2fr;
        gap: 6px;
    }
    
    .owner-shop-selection-modal .oss-shop-list-header,
    .owner-shop-selection-modal .oss-shop-list-item {
        grid-template-columns: 1fr 2fr;
        gap: 6px;
    }
    
    .owner-shop-selection-modal .oss-item-field:nth-child(n+3) {
        display: none;
    }
    
    .owner-shop-selection-modal .oss-modal-footer {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .owner-shop-selection-modal .oss-selection-info {
        text-align: center;
        margin-bottom: 8px;
    }
    
    .owner-shop-selection-modal .oss-action-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .owner-shop-selection-modal .oss-action-buttons .oss-btn {
        flex: 1;
        max-width: 140px;
    }
}

/* 单选模式样式 */
.owner-shop-selection-modal.oss-single-mode .oss-selected-panel {
    display: none;
}

.owner-shop-selection-modal.oss-single-mode .oss-list-panel {
    border-right: none;
    flex: 1;
}

/* 深色主题适配 */
@media (prefers-color-scheme: dark) {
    .owner-shop-selection-modal .oss-modal-container {
        background-color: #1a1a1a;
        color: #ffffff;
    }
    
    .owner-shop-selection-modal .oss-modal-header {
        background-color: #2d2d2d;
        border-bottom-color: #404040;
    }
    
    .owner-shop-selection-modal .oss-modal-title {
        color: #ffffff;
    }
    
    .owner-shop-selection-modal .oss-panel-header {
        background-color: #2d2d2d;
        border-bottom-color: #404040;
    }
    
    .owner-shop-selection-modal .oss-list-container {
        scrollbar-color: #404040 #2d2d2d;
    }
    
    .owner-shop-selection-modal .oss-owner-list-header,
    .owner-shop-selection-modal .oss-shop-list-header {
        background-color: #2d2d2d;
        border-bottom-color: #404040;
        color: #a0a0a0;
    }
    
    .owner-shop-selection-modal .oss-owner-list-item,
    .owner-shop-selection-modal .oss-shop-list-item {
        background-color: #1a1a1a;
        border-bottom-color: #2d2d2d;
    }
    
    .owner-shop-selection-modal .oss-owner-list-item:hover,
    .owner-shop-selection-modal .oss-shop-list-item:hover {
        background-color: #2d2d2d;
    }
    
    .owner-shop-selection-modal .oss-owner-list-item.oss-selected,
    .owner-shop-selection-modal .oss-shop-list-item.oss-selected {
        background-color: rgba(0, 82, 217, 0.2);
    }
    
    #owner-shop-selection-overlay .oss-pagination-container,
    .owner-shop-selection-modal[data-owner-shop-modal="true"] .oss-pagination-container,
    .owner-shop-pagination-container {
        background-color: #2d2d2d;
        border-top-color: #404040;
    }
    
    .owner-shop-selection-modal .oss-modal-footer {
        background-color: #2d2d2d;
        border-top-color: #404040;
    }
}