/* 书签管理系统样式 */
/*
重要提示：此CSS文件必须在页面最后加载（在</body>标签前），以确保：
1. 覆盖页面上原有的通用样式（如a、button、input等标签）
2. 使用ID选择器或更具体的类选择器提高优先级
3. 避免与nav.css、bookMenu.css等原有样式冲突
*/

/* 防止模态框显示时出现水平滚动条 */
.bookmark-window.show,
.bookmark-overlay.show {
    overflow-x: hidden !important;
}

/* 书签下拉菜单 */
.bookmark-menu {
    position: relative;
    float: right;
}

/* 上回看到容器 */
#historyMini {
    display: inline-block;
    margin-right: 10px;
}

#historyMini a {
    display: inline-block;
    padding: 8px 15px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

#historyMini a:hover {
    background: #e8e8e8;
    border-color: #999;
    text-decoration: none;
}

.bookmark-header {
    cursor: pointer;
}

.bookmark-header:hover {
    color: #ff0000;
     cursor: pointer;
}

 
/* 书签下拉内容 */
.bookmark-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    max-width: 900px;
    z-index: 1000;
}

.bookmark-dropdown.show {
    display: block;
}

/* 书签管理窗口 */
.bookmark-window {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    display: none;
    z-index: 2000;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.bookmark-window.show {
    display: block;
}

/* 窗口遮罩 */
.bookmark-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1999;
    margin: 0;
    padding: 0;
}

.bookmark-overlay.show {
    display: block;
}

/* 窗口头部 */
.bookmark-window-header {
    padding: 5px 3px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: block;
overflow: hidden;
clear: both;
}

.bookmark-window-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    float:left;
}

.bookmark-header-actions {
    float: right;
    align-items: center;
}

.bookmark-window-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    transition: color 0.3s;
    display: inline-block;
    text-decoration: none;
    padding:0 8px;
}

.bookmark-window-close:hover {
    color: #ff0000;
}

/* 窗口内容区 */
.bookmark-window-body {
    height: calc(100% - 50px);
    width: 100%;
}

/* 书签分区 */
.bookmark-section {
    margin-bottom: 5px;
}

.bookmark-section:last-child {
    margin-bottom: 0;
}

.bookmark-section-header {
    
    margin-bottom: 5px;
    padding-bottom: 5px;
    border-bottom: 2px solid #e9ecef;
}

.bookmark-section-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.config-display {
    display: inline-block;
padding: 2px 5px;
margin: 0 5px;
font-size: 14px;
color: #935d19;
border: 1px solid #dbdbdb;
border-radius: 5px;
cursor: pointer;
font-weight: normal;
}

.config-display:hover {
    border-color: #ff0000;
    color: #ff0000;
}

/* 分隔线 */
.bookmark-divider {
    border-top: 2px solid #e9ecef;
    margin: 5px 0;
}

/* 工具栏 */
.bookmark-toolbar {
    margin-bottom: 5px;
    flex-wrap: wrap;
}

.bookmark-btn {
    padding: 3px 5px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    display: inline-block;
    text-decoration: none;
    color: #333;
}

.bookmark-btn:hover {
    color:#ff0000;
    border-color: #ff0000;
}

.bookmark-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.bookmark-btn.primary {
    color: #ffffff;
    background: #A88A66;
}

.bookmark-btn.primary:hover {
    background: #ff0000;
}

.bookmark-btn.danger:hover {
  color:#ff0000;
  border-color: #ff0000;
}

/* 书签表格 */
.bookmark-table-container {
    width: 100%;
}

.bookmark-table {
    width: 100%;
    font-size: 14px;
}

.bookmark-table th,
.bookmark-table td {
    border-bottom: 1px solid #e9ecef;
    font-size:14px;
    font-weight: normal;
    color: #777;
}

.select-th {
    width: 20px;
}

.bookmark-table th {
    background: #faf9f8;
    font-weight: normal;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
}

.bookmark-table th:hover {
    background: #fefef9;
}

/* 隔行变色 - 使用具体选择器 */
.bookmark-table tbody tr:nth-child(even) {
    background-color: #faf9f8;
}

.bookmark-table tbody tr:nth-child(odd) {
    background-color: #fff;
}

/* hover效果 - 使用具体选择器 */
.bookmark-table tbody tr:hover {
    background-color: #faf9f8;
}

.bookmark-table tr.selected {
    background-color: #d0e4ff !important;
}

.bookmark-index{width:10px;text-align: center;}
.bookmark-name{text-align: left;padding:0 5px;}
.bookmark-add-time{font-size:12px;color:#555;width:90px;text-align: center;}
.caozuo{width:50px;text-align: center;}


/* 排序图标 */
.sort-icon {
    display: inline-block;
    margin-left: 5px;
    color: #666;
    font-size: 12px;
}

.sort-icon::before {
    content: '⇅';
}

.bookmark-table th.sort-asc .sort-icon::before {
    content: '↑';
}

.bookmark-table th.sort-desc .sort-icon::before {
    content: '↓';
}

/* 书签链接 - 使用更具体的选择器确保优先级 */
.bookmark-table .bookmark-link {
    text-decoration: none;
    font-weight: normal;
    word-break: break-all;
    white-space: normal;
    color: #7c511d;
    font-size: 16px;
}

.bookmark-table .bookmark-link:hover {
    text-decoration: underline;
    color:#ff0000
}

.bookmark-table .bookmark-url {
    color: #6c757d;
    font-size: 12px;
    text-decoration: none;
    word-break: break-all;
    white-space: normal;
}

.bookmark-table .bookmark-url:hover {
    color: #007bff;
    text-decoration: underline;
}

/* 小按钮 */
.btn-small {
   padding: 2px 5px;
font-size: 12px;
border: 1px solid #c1c1c1;
background: #fff;
border-radius: 3px;
cursor: pointer;
text-decoration: none;
color: #333;
}
.btn-small:hover{
  color:#ff0000;
    border-color: #ff0000;
}





.btn-delete:hover {
   color:#ff0000;
    border-color: #ff0000;
}

/* 分页 */
.bookmark-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 5px 0;
    flex-wrap: wrap;
}

.bookmark-pagination a {
    padding: 2px 5px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: inline-block;
    text-decoration: none;
    color: #333;
}

.bookmark-pagination a:hover:not(.disabled) {
    background: #f8f9fa;
    border-color: #999;
}

.bookmark-pagination a.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.page-info {
    padding: 0 5px;
    font-size: 14px;
    color: #666;
}

.bookmark-pagination input {
    padding: 3px 3px;
    border: 1px solid #ddd;
    text-align: center;
    font-size: 14px;
    outline: none;
}

/* 快捷书签列表 */
.quick-bookmark-list {
    max-height: 300px;
    overflow-y: auto;
}

.quick-bookmark-item {
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quick-bookmark-item:hover {
    background: #f8f9fa;
}

.quick-bookmark-item:last-child {
    border-bottom: none;
}

.quick-bookmark-link {
    color: #333;
    text-decoration: none;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quick-bookmark-link:hover {
    color: #007bff;
}

.quick-bookmark-actions {
    display: flex;
    gap: 5px;
    margin-left: 10px;
}

/* 复选框样式 */
.bookmark-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.auto-bookmark-checkbox,
.manual-bookmark-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .bookmark-window {
        width: 100%;
        height: 100%;
    }

    .bookmark-table-container {
        overflow-x: auto;
    }
 
 

  
}

/* 空状态 */
.bookmark-empty {
    text-align: center;
    padding: 5px 5px;
    color: #999;
}

.bookmark-empty-icon {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
}

/* 文件上传 */
.bookmark-file-input {
    display: none;
}

/* 提示信息 */
.bookmark-tip {
    font-size: 14px;
    color: #6c757d;
    margin-top: 5px;
}

/* 表格排序指示器 */
.bookmark-table th.sort-asc .sort-icon::after {
    content: ' ↑';
}

.bookmark-table th.sort-desc .sort-icon::after {
    content: ' ↓';
}

/* 选中状态 */
.bookmark-item.selected {
    background-color: #d0e4ff !important;
}

/* 统计信息 */
.bookmark-stats {
    display: none;
    padding:3px 5px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    font-size: 14px;
    color: #666;
}

/* 滚动条样式 */
.bookmark-window-body::-webkit-scrollbar,
.quick-bookmark-list::-webkit-scrollbar {
    width: 8px;
}

.bookmark-window-body::-webkit-scrollbar-track,
.quick-bookmark-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.bookmark-window-body::-webkit-scrollbar-thumb,
.quick-bookmark-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.bookmark-window-body::-webkit-scrollbar-thumb:hover,
.quick-bookmark-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 消息提示样式 */
.bookmark-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 10px;
    border-radius: 5px;
    font-size: 16px;
    color: #fff;
    z-index: 9999;
}

.bookmark-message-success {
    background-color: #28a745;
}

.bookmark-message-warning {
    background-color: #ffc107;
    color: #333;
}

.bookmark-message-error {
    background-color: #dc3545;
}

.bookmark-message-info {
    background-color: #17a2b8;
}

.bookmark-message-hide {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
}

/* 配置编辑对话框 */
.config-edit-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2001;
    margin: 0;
    padding: 0;
}

.config-edit-overlay.show {
    display: block;
}

.config-edit-dialog {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    width: 400px;
    max-width: 90%;
    z-index: 2002;
}

.config-edit-dialog.show {
    display: block;
}

.config-edit-header {
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.config-edit-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.config-edit-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    transition: color 0.3s;
    display: inline-block;
    text-decoration: none;
}

.config-edit-close:hover {
    color: #333;
}

.config-edit-body {
    padding: 20px;
}

.config-edit-row {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.config-edit-row:last-child {
    margin-bottom: 0;
}

.config-edit-label {
    width: 120px;
    font-size: 14px;
    color: #333;
}

.config-edit-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
}

.config-edit-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.1);
}

.config-edit-tip {
   
    padding: 5px;
    background: #f8f9fa;
    border-radius: 5px;
    font-size: 14px;
    color: #6c757d;
}

.config-edit-footer {
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    border-radius: 0 0 8px 8px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.orderText{font-size:14px;color:#666;display: inline-block;}