/* 离线下载对话框样式 */

/* 选项卡 */
.od-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #E2E8F0;
}

.od-tab {
    padding: 10px 24px;
    border: none;
    background: none;
    font-size: 14px;
    font-weight: 500;
    color: #64748B;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.od-tab:hover {
    color: #1871cd;
}

.od-tab.active {
    color: #1871cd;
    border-bottom-color: #1871cd;
}

.od-tab-content {
    display: none;
}

.od-tab-content.active {
    display: block;
}

/* 表单组 */
.od-form-group {
    margin-bottom: 16px;
}

.od-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    margin-bottom: 6px;
}

.od-form-group label small {
    color: #94A3B8;
    font-weight: 400;
}

/* 文本域 */
.od-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #CBD5E1;
    border-radius: 8px;
    font-size: 13px;
    font-family: 'Courier New', monospace;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.od-textarea:focus {
    border-color: #1871cd;
    box-shadow: 0 0 0 3px rgba(24, 113, 205, 0.1);
}

/* 高级配置按钮 */
.od-advanced-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid #CBD5E1;
    border-radius: 6px;
    background: #F8FAFC;
    font-size: 13px;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
}

.od-advanced-btn:hover {
    background: #F1F5F9;
    border-color: #94A3B8;
}

.od-advanced-btn.active {
    background: #EFF6FF;
    border-color: #1871cd;
    color: #1871cd;
}

/* Headers 面板 */
.od-headers-panel {
    margin-top: 12px;
    padding: 16px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
}

.od-headers-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.od-header-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    border: 1px solid #CBD5E1;
    border-radius: 8px;
    background: #F8FAFC;
    margin-bottom: 8px;
}

.od-header-row input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.od-header-row input:focus {
    border-color: #1871cd;
}

.od-header-row input:first-child {
    font-weight: 500;
}

.od-header-remove-btn {
    align-self: flex-end;
    padding: 4px 10px;
    border: none;
    background: #FEE2E2;
    color: #DC2626;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s;
}

.od-header-remove-btn:hover {
    background: #FECACA;
}

.od-header-add-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.od-header-select {
    padding: 6px 10px;
    border: 1px solid #CBD5E1;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    background: white;
    cursor: pointer;
}

.od-header-select:focus {
    border-color: #1871cd;
}

.od-btn-sm {
    padding: 6px 14px;
    border: none;
    background: #1871cd;
    color: white;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}

.od-btn-sm:hover {
    background: #1560b5;
}

/* 信息框 */
.od-info-box {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background: #F0F7FF;
    border: 1px solid #BFDBFE;
    border-radius: 8px;
    font-size: 13px;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 16px;
}

.od-info-box code {
    background: #E0E7FF;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 12px;
    color: #3730A3;
}

.od-warning-box {
    background: #FFFBEB;
    border-color: #FDE68A;
}

.od-warning-box code {
    background: #FEF3C7;
    color: #92400E;
}

/* 复选框 */
.od-checkbox-group {
    margin-bottom: 16px;
}

.od-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #475569;
    cursor: pointer;
}

.od-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #1871cd;
}

/* 管理列表 */
.od-manage-list {
    /*max-height: 500px;*/
    overflow-y: auto;
}

/* 加载动画 */
.od-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
    gap: 16px;
}

.od-loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #E2E8F0;
    border-top-color: #1871cd;
    border-radius: 50%;
    animation: od-spin 0.8s linear infinite;
}

.od-loading-text {
    color: #94A3B8;
    font-size: 14px;
}

@keyframes od-spin {
    to { transform: rotate(360deg); }
}

.od-task-item {
    padding: 14px 16px;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #FAFBFC;
}

.od-task-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.od-task-id {
    font-size: 12px;
    color: #94A3B8;
    font-weight: 500;
}

.od-task-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.od-task-status.pending {
    background: #DBEAFE;
    color: #1D4ED8;
}

.od-task-status.completed {
    background: #D1FAE5;
    color: #059669;
}

.od-task-urls {
    font-size: 12px;
    color: #475569;
    word-break: break-all;
    line-height: 1.6;
    margin-bottom: 6px;
}

.od-task-urls code {
    background: #F1F5F9;
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 11px;
}

.od-task-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    font-size: 12px;
    color: #94A3B8;
}

.od-task-delete-btn {
    padding: 4px 12px;
    border: 1px solid #FCA5A5;
    background: #FEF2F2;
    color: #DC2626;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.od-task-delete-btn:hover {
    background: #FEE2E2;
    border-color: #F87171;
}

/* 响应式 */
@media (max-width: 640px) {
    .od-header-add-row {
        flex-direction: column;
        align-items: stretch;
    }
}

/* .torrent 文件浏览器 */
.od-breadcrumb {
    font-size: 12px;
    color: #64748B;
}

.od-bc-item {
    color: #1871cd;
    cursor: pointer;
}

.od-bc-item:hover {
    text-decoration: underline;
}

.od-bc-sep {
    color: #94A3B8;
    margin: 0 2px;
}

.od-torrent-file-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    background: #FAFBFC;
}

.od-torrent-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid #F1F5F9;
    font-size: 13px;
    color: #334155;
    cursor: pointer;
    transition: background 0.15s;
}

.od-torrent-item:hover {
    background: #F0F7FF;
}

.od-torrent-item:last-child {
    border-bottom: none;
}

.od-torrent-folder {
    color: #92400E;
    font-weight: 500;
}

.od-torrent-file {
    color: #334155;
}

.od-torrent-selected {
    background: #EFF6FF;
}

.od-torrent-protected {
    color: #94A3B8;
    cursor: not-allowed;
    opacity: 0.7;
}

.od-torrent-filename {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.od-torrent-filesize {
    font-size: 11px;
    color: #94A3B8;
    flex-shrink: 0;
}

.od-torrent-checkbox {
    width: 14px;
    height: 14px;
    accent-color: #1871cd;
    flex-shrink: 0;
}

.od-torrent-unlock-btn {
    padding: 2px 6px;
    border: 1px solid #FDE68A;
    background: #FFFBEB;
    color: #92400E;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    transition: all 0.15s;
}

.od-torrent-unlock-btn:hover {
    background: #FEF3C7;
    border-color: #FBBF24;
}

#offline-download-manage-dialog .dialog-container{
    max-height: calc(100vh - 120px);
}
#offline-download-manage-dialog .dialog-body{
    overflow-y: scroll;
    max-height: calc(100vh - 170px);
    padding: 20px;
    width: calc(100% + 20px);
}