/**
 * Parsing Tracker Widget Styles
 */

.parsing-tracker {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Collapsed Badge */
.tracker-badge {
    padding: 12px 20px;
    border-radius: 25px;
    background: #0d6efd;
    color: white;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.tracker-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.tracker-badge.badge-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.tracker-badge.badge-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
}

.tracker-badge.badge-danger {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
}

/* Expanded View */
.tracker-expanded {
    width: 400px;
    max-height: 600px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.tracker-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tracker-header h6 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.tracker-actions {
    display: flex;
    gap: 8px;
}

.btn-minimize,
.btn-close-item {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
}

.btn-minimize:hover,
.btn-close-item:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.tracker-body {
    padding: 12px;
    max-height: 500px;
    overflow-y: auto;
}

/* Custom Scrollbar */
.tracker-body::-webkit-scrollbar {
    width: 6px;
}

.tracker-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.tracker-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.tracker-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Section */
.tracker-section {
    margin-bottom: 16px;
}

.section-title {
    font-size: 13px;
    font-weight: 600;
    color: #666;
    margin-bottom: 8px;
    padding-left: 4px;
}

/* Item */
.tracker-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
}

.tracker-item:hover {
    background: #e9ecef;
    transform: translateX(-2px);
}

.item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.item-title {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.item-subtitle {
    font-size: 12px;
    color: #666;
}

.item-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-close-item {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    font-size: 14px;
}

.btn-close-item:hover {
    background: rgba(220, 53, 69, 0.2);
}

/* Progress Bar */
.progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: rgba(13, 110, 253, 0.2);
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 40%;
    background: linear-gradient(90deg, transparent, #0d6efd, transparent);
    animation: progress-slide 1.5s ease-in-out infinite;
}

@keyframes progress-slide {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(250%);
    }
}

/* Toast Notification */
.tracker-toast {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background: #333;
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.tracker-toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .parsing-tracker {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
    }

    .tracker-badge {
        border-radius: 0;
        width: 100%;
        text-align: center;
        padding: 16px;
    }

    .tracker-expanded {
        width: 100%;
        border-radius: 15px 15px 0 0;
        max-height: 80vh;
    }

    .tracker-toast {
        right: 10px;
        left: 10px;
        bottom: 70px;
    }
}

/* Button Styles */
.tracker-item .btn-sm {
    padding: 4px 12px;
    font-size: 12px;
    border-radius: 6px;
    font-weight: 500;
}

.tracker-item .btn-success {
    background: #28a745;
    border: none;
    color: white;
}

.tracker-item .btn-success:hover {
    background: #218838;
}

.tracker-item .btn-warning {
    background: #ffc107;
    border: none;
    color: #212529;
}

.tracker-item .btn-warning:hover {
    background: #e0a800;
}
