/* ========================================
   Bulk HTML Interlinking - Additional Styles
   ======================================== */

/* Interlink Page Layout */
.interlink-layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 20px;
    flex: 1;
    overflow: hidden;
}

/* Results Panel */
.results-panel {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    border: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* File Count Badge */
#fileCount {
    color: var(--primary-color);
    font-weight: 600;
}

/* Process Section */
.process-section {
    padding: 15px;
    border-top: 1px solid var(--card-border);
}

.btn-large {
    width: 100%;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 600;
}

.btn-large i {
    margin-right: 10px;
}

/* Results Content */
.results-content {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.results-section {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 15px;
}

.results-section.warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.results-section h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.results-section.warning h4 {
    color: var(--warning-color);
}

.invalid-urls-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 13px;
}

.invalid-urls-list li {
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    margin-bottom: 5px;
    word-break: break-all;
}

/* Processed Files List */
.processed-files-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.processed-file-item {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 12px 15px;
    border: 1px solid var(--card-border);
    transition: var(--transition);
}

.processed-file-item:hover {
    border-color: var(--primary-color);
}

.processed-file-item .file-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.processed-file-item .file-header .btn-icon {
    margin-left: auto;
    padding: 6px 10px;
    font-size: 12px;
    background-color: var(--primary-color) !important;
    color: #fff !important;
}

.processed-file-item .file-header .btn-icon:hover {
    background-color: var(--primary-hover) !important;
    color: #fff !important;
}

.processed-file-item .file-header .btn-icon i {
    color: #fff !important;
}

.processed-file-item .filename {
    font-weight: 500;
    word-break: break-all;
}

.file-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.file-stats .stat {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 8px;
    border-radius: 4px;
}

.file-stats .stat i {
    font-size: 11px;
}

.file-stats .stat.success {
    color: var(--success-color);
    background: rgba(16, 185, 129, 0.1);
}

.file-stats .stat.muted {
    opacity: 0.5;
}

/* Preview Header */
.preview-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--card-border);
}

.preview-select {
    flex: 1;
    padding: 8px 12px;
    background: var(--dark-bg);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
}

.preview-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Preview Frame */
.preview-frame {
    width: 100%;
    height: 100%;
    min-height: 500px;
    border: none;
    background: #fff;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    overflow: auto;
}

.preview-content {
    flex: 1;
    overflow: auto;
    display: flex;
    flex-direction: column;
    background: #fff;
}

/* Tab Content */
.tab-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Progress Bar */
.progress-bar {
    width: 200px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin-top: 15px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

#progressText {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* Loading overlay active state */
.loading-overlay.active {
    display: flex;
}

/* File Item Styling */
.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    margin-bottom: 8px;
    border: 1px solid transparent;
    transition: var(--transition);
}

.file-item:hover {
    border-color: var(--card-border);
}

.file-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.file-icon {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.file-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.file-name {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size {
    font-size: 11px;
    color: var(--text-muted);
}

.btn-danger {
    background: transparent;
    color: var(--danger-color);
    border: none;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Toast error state */
.toast.error {
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
}

.toast.error i {
    display: none;
}

.toast.error::before {
    content: '\f071';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-right: 10px;
}

/* Responsive */
@media (max-width: 1200px) {
    .interlink-layout {
        grid-template-columns: 350px 1fr;
    }
}

@media (max-width: 992px) {
    .interlink-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }
    
    .upload-panel {
        max-height: 50vh;
        overflow-y: auto;
    }
}
