/* Bulk Link Extractor WordPress Plugin Styles */

.ble-widget {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    background: #f8fafc;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
}

.ble-widget[data-theme="dark"] {
    background: #1a202c;
    color: #e2e8f0;
}

/* Header */
.ble-header {
    background: white;
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ble-widget[data-theme="dark"] .ble-header {
    background: #2d3748;
    border-bottom-color: #4a5568;
}

.ble-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ble-title .ble-icon {
    background: #3b82f6;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.ble-title h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1a202c;
}

.ble-widget[data-theme="dark"] .ble-title h3 {
    color: #e2e8f0;
}

.ble-title p {
    margin: 0;
    font-size: 14px;
    color: #64748b;
}

.ble-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ble-status-text {
    font-size: 14px;
    font-weight: 500;
    color: #10b981;
}

.ble-status-indicator {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
}

/* Container */
.ble-container {
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .ble-container {
        grid-template-columns: 1fr;
    }
}

.ble-section {
    margin-bottom: 20px;
}

/* Cards */
.ble-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ble-widget[data-theme="dark"] .ble-card {
    background: #2d3748;
}

.ble-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ble-widget[data-theme="dark"] .ble-card-header {
    border-bottom-color: #4a5568;
}

.ble-card-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1a202c;
}

.ble-widget[data-theme="dark"] .ble-card-header h4 {
    color: #e2e8f0;
}

.ble-card-content {
    padding: 20px;
}

/* Buttons */
.ble-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    text-decoration: none;
}

.ble-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ble-btn-primary {
    background: #3b82f6;
    color: white;
}

.ble-btn-primary:hover:not(:disabled) {
    background: #2563eb;
}

.ble-btn-success {
    background: #10b981;
    color: white;
}

.ble-btn-success:hover:not(:disabled) {
    background: #059669;
}

.ble-btn-warning {
    background: #f59e0b;
    color: white;
}

.ble-btn-warning:hover:not(:disabled) {
    background: #d97706;
}

.ble-btn-danger {
    background: #ef4444;
    color: white;
}

.ble-btn-danger:hover:not(:disabled) {
    background: #dc2626;
}

.ble-btn-ghost {
    background: transparent;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.ble-btn-ghost:hover:not(:disabled) {
    background: #f1f5f9;
}

.ble-widget[data-theme="dark"] .ble-btn-ghost {
    color: #cbd5e0;
    border-color: #4a5568;
}

.ble-widget[data-theme="dark"] .ble-btn-ghost:hover:not(:disabled) {
    background: #4a5568;
}

.ble-btn-full {
    width: 100%;
    justify-content: center;
    padding: 12px 16px;
    margin-bottom: 12px;
}

/* Control Grid */
.ble-control-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

/* Form Elements */
.ble-card-content label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #374151;
}

.ble-widget[data-theme="dark"] .ble-card-content label {
    color: #e2e8f0;
}

.ble-card-content textarea,
.ble-card-content input[type="text"],
.ble-card-content input[type="number"],
.ble-card-content select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.ble-widget[data-theme="dark"] .ble-card-content textarea,
.ble-widget[data-theme="dark"] .ble-card-content input,
.ble-widget[data-theme="dark"] .ble-card-content select {
    background: #4a5568;
    border-color: #4a5568;
    color: #e2e8f0;
}

.ble-card-content textarea:focus,
.ble-card-content input:focus,
.ble-card-content select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ble-card-content textarea {
    resize: vertical;
    min-height: 120px;
}

/* URL Info */
.ble-url-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    font-size: 14px;
    color: #64748b;
}

/* File Upload */
.ble-file-upload {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.ble-widget[data-theme="dark"] .ble-file-upload {
    border-top-color: #4a5568;
}

.ble-file-input {
    margin-top: 8px;
}

.ble-file-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border: 2px dashed #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.2s;
    color: #64748b;
}

.ble-file-label:hover {
    border-color: #3b82f6;
}

/* Settings */
.ble-setting {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.ble-setting:last-child {
    margin-bottom: 0;
}

.ble-setting select,
.ble-setting input[type="number"] {
    width: auto;
    min-width: 80px;
}

.ble-setting-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Tooltips */
.ble-tooltip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: #6b7280;
    color: white;
    border-radius: 50%;
    font-size: 10px;
    font-weight: bold;
    cursor: help;
    position: relative;
}

.ble-widget[data-theme="dark"] .ble-tooltip {
    background: #9ca3af;
}

.ble-tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: #1a202c;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: normal;
    white-space: normal;
    width: 240px;
    text-align: left;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ble-tooltip:hover::before {
    content: '';
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1a202c;
    z-index: 1000;
}

/* Checkbox */
.ble-checkbox {
    display: flex !important;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin-bottom: 0 !important;
}

.ble-checkbox input[type="checkbox"] {
    width: auto !important;
    margin: 0;
}

.ble-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Progress */
.ble-progress-info {
    display: flex;
    gap: 16px;
    font-size: 14px;
}

.ble-progress-bar {
    width: 100%;
    height: 12px;
    background: #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 20px;
}

.ble-widget[data-theme="dark"] .ble-progress-bar {
    background: #4a5568;
}

.ble-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
}

.ble-progress-fill.ble-animated::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Stats Grid */
.ble-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

@media (max-width: 640px) {
    .ble-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.ble-stat {
    text-align: center;
    padding: 12px;
    background: #f8fafc;
    border-radius: 6px;
}

.ble-widget[data-theme="dark"] .ble-stat {
    background: #4a5568;
}

.ble-stat-number {
    font-size: 20px;
    font-weight: 700;
    color: #1a202c;
}

.ble-widget[data-theme="dark"] .ble-stat-number {
    color: #e2e8f0;
}

.ble-stat-label {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}

/* Current Processing */
.ble-current-processing {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: #eff6ff;
    border-radius: 6px;
    font-size: 14px;
}

.ble-widget[data-theme="dark"] .ble-current-processing {
    background: #1e3a8a;
}

.ble-loading {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Results Actions */
.ble-results-actions {
    display: flex;
    gap: 8px;
}

/* Table */
.ble-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.ble-table th,
.ble-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.ble-widget[data-theme="dark"] .ble-table th,
.ble-widget[data-theme="dark"] .ble-table td {
    border-bottom-color: #4a5568;
}

.ble-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #374151;
}

.ble-widget[data-theme="dark"] .ble-table th {
    background: #4a5568;
    color: #e2e8f0;
}

.ble-table td a {
    color: #3b82f6;
    text-decoration: none;
}

.ble-table td a:hover {
    text-decoration: underline;
}

.ble-table .ble-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    font-size: 12px;
    border-radius: 12px;
    font-weight: 500;
}

.ble-badge-external {
    background: #dbeafe;
    color: #1d4ed8;
}

.ble-badge-internal {
    background: #dcfce7;
    color: #166534;
}

.ble-badge-valid {
    background: #dcfce7;
    color: #166534;
}

.ble-badge-error {
    background: #fee2e2;
    color: #dc2626;
}

/* Empty State */
.ble-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
}

.ble-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.ble-empty-state h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: #374151;
}

.ble-widget[data-theme="dark"] .ble-empty-state h3 {
    color: #e2e8f0;
}

.ble-empty-state p {
    margin: 0;
}

/* Pagination */
.ble-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
    font-size: 14px;
}

.ble-widget[data-theme="dark"] .ble-pagination {
    border-top-color: #4a5568;
}

.ble-pagination-controls {
    display: flex;
    gap: 8px;
}

/* Error List */
.ble-error-list {
    max-height: 300px;
    overflow-y: auto;
}

.ble-error-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 6px;
    border-left: 4px solid #ef4444;
    background: #fef2f2;
    font-size: 14px;
}

.ble-widget[data-theme="dark"] .ble-error-item {
    background: #4a1b1b;
}

.ble-error-item:last-child {
    margin-bottom: 0;
}

.ble-error-content {
    flex: 1;
}

.ble-error-message {
    font-weight: 500;
    color: #dc2626;
    margin-bottom: 4px;
}

.ble-error-url {
    color: #6b7280;
    margin-bottom: 4px;
    word-break: break-all;
}

.ble-error-time {
    color: #9ca3af;
    font-size: 12px;
}

/* No Errors */
.ble-no-errors {
    text-align: center;
    padding: 20px;
    color: #10b981;
}

.ble-no-errors .ble-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

/* Loading Overlay */
.ble-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.ble-widget[data-theme="dark"] .ble-loading-overlay {
    background: rgba(26, 32, 44, 0.9);
}

.ble-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

/* Toast Notifications */
.ble-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
}

.ble-toast {
    background: white;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 300px;
    border-left: 4px solid #3b82f6;
    animation: slideIn 0.3s ease;
}

.ble-toast.ble-toast-success {
    border-left-color: #10b981;
}

.ble-toast.ble-toast-error {
    border-left-color: #ef4444;
}

.ble-toast-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.ble-toast-message {
    color: #64748b;
    font-size: 14px;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .ble-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .ble-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .ble-container {
        padding: 16px;
    }
    
    .ble-card-content {
        padding: 16px;
    }
    
    .ble-table {
        font-size: 12px;
    }
    
    .ble-table th,
    .ble-table td {
        padding: 8px 4px;
    }
}