/* Individual Collection Page Styling */
/* Uses CSS variables from styles.css for theme support */

.ldr-rag-manager-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--bg-primary);
    min-height: 100vh;
    color: var(--text-primary);
}

@media (prefers-reduced-motion: no-preference) {
    .ldr-rag-manager-container {
        animation: fadeInUp 0.6s ease;
    }
}

/* Header Section */
.ldr-rag-header {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

@media (prefers-reduced-motion: no-preference) {
    .ldr-rag-header {
        animation: slideDown 0.6s ease-out;
    }
}

.ldr-rag-header h1 {
    color: var(--text-primary);
    font-size: 2.5rem;
    font-weight: 700;
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.ldr-rag-header h1 i {
    color: var(--accent-primary);
}

.ldr-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin: 10px 0 0 0;
    font-style: italic;
}

/* Section Styling */
.ldr-rag-section {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .ldr-rag-section {
        animation: fadeInUp 0.8s ease-out;
    }

    .ldr-rag-section:hover {
        transform: translateY(-2px);
        box-shadow: 0 12px 40px rgba(var(--shadow-color-rgb), 0.15);
    }
}

.ldr-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.ldr-section-header h2 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ldr-section-header h2 i {
    color: var(--accent-primary);
}

/* Collection Actions Grid */
.ldr-collection-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.ldr-collection-actions-grid .btn {
    padding: 15px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.ldr-collection-actions-grid .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(var(--text-primary-rgb), 0.2), transparent);
    transition: left 0.5s ease;
}

.ldr-collection-actions-grid .btn:hover::before {
    left: 100%;
}

.ldr-btn-primary {
    background: var(--success-color);
    color: white;
}

.ldr-btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--success-color-rgb), 0.3);
}

.ldr-btn-success {
    background: linear-gradient(135deg, var(--accent-tertiary), var(--accent-primary));
    color: white;
}

.ldr-btn-success:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--accent-tertiary-rgb), 0.3);
}

.ldr-btn-warning {
    background: var(--warning-color);
    color: var(--bg-primary);
}

.ldr-btn-warning:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--warning-color-rgb), 0.3);
}

.ldr-btn-danger {
    background: var(--error-color);
    color: white;
}

.ldr-btn-danger:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--error-color-rgb), 0.3);
}

.ldr-btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.ldr-btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

/* Statistics Grid */
.ldr-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.ldr-stat-card {
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.ldr-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
}

.ldr-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(var(--shadow-color-rgb), 0.15);
    border-color: var(--accent-primary);
}

.ldr-stat-success::before {
    background: var(--success-color);
}

.ldr-stat-warning::before {
    background: var(--warning-color);
}

.ldr-stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ldr-stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Filter Controls */
.ldr-filter-controls {
    display: flex;
    gap: 10px;
}

.ldr-filter-controls .btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 2px solid var(--border-color);
    background: rgba(var(--bg-tertiary-rgb), 0.5);
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.ldr-filter-controls .btn.active {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    border-color: var(--accent-primary);
}

.ldr-filter-controls .btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.ldr-filter-controls .btn.active:hover {
    color: white;
}

/* Documents List */
.ldr-documents-list {
    max-height: 600px;
    overflow-y: auto;
    padding: 10px;
}

.ldr-documents-list::-webkit-scrollbar {
    width: 8px;
}

.ldr-documents-list::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 10px;
}

.ldr-documents-list::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 10px;
}

.ldr-documents-list::-webkit-scrollbar-thumb:hover {
    filter: brightness(1.1);
}

/* Loading Spinner */
.ldr-loading-spinner {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.ldr-loading-spinner i {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--accent-primary);
}

/* Empty State */
.ldr-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.ldr-empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: var(--text-muted);
}

.ldr-empty-state p {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.ldr-empty-state .btn {
    margin-top: 20px;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
}

/* Progress Container */
.ldr-progress-container {
    margin: 20px 0;
}

.ldr-progress-bar {
    width: 100%;
    height: 12px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.ldr-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 10px;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.ldr-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(var(--text-primary-rgb), 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

.ldr-progress-text {
    text-align: center;
    color: var(--accent-tertiary);
    font-weight: 600;
    font-size: 1.1rem;
    margin-top: 10px;
}

.ldr-progress-log {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 15px;
    max-height: 200px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

/* Document Items */
.ldr-document-item {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 15px;
}

.ldr-document-item .ldr-document-info {
    flex: 1;
}

.ldr-document-item .ldr-document-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.ldr-document-item .ldr-document-actions button {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.ldr-document-item .ldr-document-actions button:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.ldr-document-item .ldr-document-actions .ldr-btn-delete-doc:hover {
    background: rgba(var(--error-color-rgb), 0.15);
    border-color: var(--error-color);
    color: var(--error-color);
}

.ldr-document-item .ldr-document-actions .ldr-btn-remove-from-collection:hover {
    background: rgba(var(--warning-color-rgb), 0.15);
    border-color: var(--warning-color);
    color: var(--warning-color);
}

.ldr-document-item .ldr-document-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.ldr-document-item .ldr-document-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Badge Styles */
.ldr-badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ldr-badge-success {
    background: var(--success-color);
    color: white;
}

.ldr-badge-warning {
    background: var(--warning-color);
    color: var(--bg-primary);
}

/* Upload Results Messages */
.ldr-upload-results {
    margin-top: 15px;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.ldr-success-message {
    color: var(--success-color);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.ldr-error-message {
    color: var(--error-color);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.ldr-error-list {
    margin: 10px 0;
    padding-left: 20px;
}

.ldr-error-list li {
    color: var(--error-color);
    margin-bottom: 5px;
}

/* Log Entry Styles */
.ldr-log-entry {
    padding: 8px 12px;
    margin: 4px 0;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    font-weight: 500;
}

.ldr-log-info {
    background: rgba(var(--accent-tertiary-rgb), 0.15);
    color: var(--accent-tertiary);
    border-left: 4px solid var(--accent-tertiary);
}

.ldr-log-success {
    background: rgba(var(--success-color-rgb), 0.1);
    color: var(--success-color);
    border-left: 3px solid var(--success-color);
}

.ldr-log-error {
    background: rgba(var(--error-color-rgb), 0.1);
    color: var(--error-color);
    border-left: 3px solid var(--error-color);
}

.ldr-document-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.ldr-document-item:hover::before {
    transform: scaleY(1);
}

.ldr-document-item:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 8px 25px rgba(var(--accent-primary-rgb), 0.15);
    transform: translateX(5px);
}

.ldr-document-item.ldr-indexed {
    border-left: 4px solid var(--success-color);
}

.ldr-document-item.ldr-unindexed {
    border-left: 4px solid var(--warning-color);
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Responsive Design */
@media (max-width: 767px) {
    .ldr-rag-manager-container {
        padding: 15px;
        border-radius: 0;
    }

    .ldr-rag-header h1 {
        font-size: 2rem;
    }

    .ldr-collection-actions-grid {
        grid-template-columns: 1fr;
    }

    .ldr-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .ldr-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .ldr-filter-controls {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .ldr-stats-grid {
        grid-template-columns: 1fr;
    }

    .ldr-rag-header {
        padding: 20px;
    }

    .ldr-rag-section {
        padding: 20px;
    }
}

/* Accessibility: Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .ldr-rag-section:hover,
    .ldr-btn-collections:hover,
    .ldr-stat-card:hover,
    .ldr-document-item:hover {
        transform: none !important;
    }

    .ldr-progress-fill::after {
        animation: none !important;
    }
}

/* Drop Zone Styles */
.ldr-drop-zone {
    border: 3px dashed var(--accent-primary);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    background-color: rgba(var(--accent-primary-rgb), 0.05);
    cursor: pointer;
    position: relative;
}

.ldr-drop-zone:hover {
    border-color: var(--accent-secondary);
    background-color: rgba(var(--accent-secondary-rgb), 0.1);
}

/* Drag-over state - INSTANT, very visible */
.ldr-drop-zone.ldr-drag-over {
    border-color: var(--success-color);
    border-style: solid;
    border-width: 4px;
    background: linear-gradient(135deg, rgba(var(--success-color-rgb), 0.15) 0%, rgba(var(--success-color-rgb), 0.1) 100%);
    box-shadow: 0 0 20px rgba(var(--success-color-rgb), 0.3), inset 0 0 30px rgba(var(--success-color-rgb), 0.1);
}

/* Spinner appears when dragging */
.ldr-drop-zone.ldr-drag-over::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    margin: -25px 0 0 -25px;
    border: 4px solid rgba(var(--success-color-rgb), 0.2);
    border-top-color: var(--success-color);
    border-radius: 50%;
    animation: drop-spinner 0.6s linear infinite;
    z-index: 10;
}

/* Pulsing glow effect */
.ldr-drop-zone.ldr-drag-over::after {
    content: 'Drop files here!';
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--success-color);
    animation: pulse-text 0.8s ease-in-out infinite alternate;
}

@keyframes drop-spinner {
    to { transform: rotate(360deg); }
}

@keyframes pulse-text {
    from { opacity: 0.7; }
    to { opacity: 1; }
}

/* Hide normal content when dragging */
.ldr-drop-zone.ldr-drag-over .ldr-drop-zone-icon,
.ldr-drop-zone.ldr-drag-over .ldr-drop-zone-text,
.ldr-drop-zone.ldr-drag-over .ldr-drop-zone-subtext,
.ldr-drop-zone.ldr-drag-over .ldr-btn-collections {
    opacity: 0.3;
}

.ldr-drop-zone-icon {
    font-size: 3rem;
    color: var(--accent-primary);
    margin-bottom: 10px;
}

.ldr-drop-zone-text {
    margin: 15px 0 5px;
    font-size: 18px;
    font-weight: 500;
}

.ldr-drop-zone-subtext {
    margin: 5px 0 15px;
    color: var(--text-muted);
}

.ldr-selected-files {
    margin-top: 15px;
    padding: 15px;
    background-color: rgba(var(--bg-tertiary-rgb), 0.5);
    border-radius: 6px;
}

.ldr-selected-files ul {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
}

.ldr-selected-files li {
    padding: 8px 12px;
    margin: 5px 0;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ldr-selected-files li i {
    color: var(--accent-tertiary);
}

/* Modal Styles - Optimized for performance */
.ldr-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: var(--overlay-color);
}

@media (prefers-reduced-motion: no-preference) {
    .ldr-modal {
        animation: fadeIn 0.3s ease;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.ldr-modal-content {
    background: var(--bg-secondary);
    margin: 5% auto;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(var(--shadow-color-rgb), 0.5);
    overflow: hidden;
}

@media (prefers-reduced-motion: no-preference) {
    .ldr-modal-content {
        animation: slideInDown 0.3s ease;
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ldr-modal-header {
    background: rgba(var(--accent-primary-rgb), 0.1);
    color: var(--text-primary);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ldr-modal-header h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
}

.ldr-close {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s ease;
    background: none;
    border: none;
    padding: 0.25rem;
    border-radius: 4px;
}

.ldr-close:hover {
    opacity: 1;
    background: rgba(var(--text-primary-rgb), 0.1);
}

.ldr-modal-body {
    padding: 2rem;
}

/* Form Styles */
.ldr-form-group {
    margin-bottom: 1.5rem;
}

.ldr-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.ldr-form-group input[type="text"],
.ldr-form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.ldr-form-group input[type="text"]:focus,
.ldr-form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(var(--accent-primary-rgb), 0.1);
    transform: translateY(-2px);
}

.ldr-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.ldr-form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.ldr-form-help {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    font-style: italic;
}

/* Button Styles - Essential for upload functionality */
.ldr-btn-collections {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.ldr-btn-collections-primary {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(var(--accent-primary-rgb), 0.3);
    border: 3px solid var(--accent-primary);
}

/* Featured button styling */
.ldr-btn-featured {
    text-decoration: none;
    font-size: 1.1rem;
    box-shadow: 0 6px 20px rgba(var(--accent-primary-rgb), 0.4);
    font-weight: 600;
}

/* Subtle pulse animation - only for users who haven't disabled motion */
@media (prefers-reduced-motion: no-preference) {
    .ldr-btn-featured:hover {
        animation: gentle-pulse 2s ease-in-out;
    }
}

@keyframes gentle-pulse {
    0%, 100% {
        box-shadow: 0 6px 20px rgba(var(--accent-primary-rgb), 0.4);
    }
    50% {
        box-shadow: 0 8px 25px rgba(var(--accent-primary-rgb), 0.5);
    }
}

.ldr-btn-collections-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--accent-primary-rgb), 0.4);
}

.ldr-btn-collections-secondary {
    background-color: rgba(var(--bg-tertiary-rgb), 0.5);
    color: var(--text-muted);
    border: 2px solid var(--border-color);
}

.ldr-btn-collections-secondary:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-2px);
}

.ldr-btn-collections-success {
    background: var(--success-color);
    color: white;
    box-shadow: 0 4px 15px rgba(var(--success-color-rgb), 0.3);
}

.ldr-btn-collections-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--success-color-rgb), 0.4);
}

.ldr-btn-collections-warning {
    background: var(--warning-color);
    color: var(--bg-primary);
    box-shadow: 0 4px 15px rgba(var(--warning-color-rgb), 0.3);
}

.ldr-btn-collections-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--warning-color-rgb), 0.4);
}

.ldr-btn-collections-danger {
    background: var(--error-color);
    color: white;
    box-shadow: 0 4px 15px rgba(var(--error-color-rgb), 0.3);
}

.ldr-btn-collections-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--error-color-rgb), 0.4);
}

.ldr-btn-lg {
    padding: 1.25rem 2.5rem;
    font-size: 1.2rem;
    min-width: 200px;
}

.ldr-btn-outline-primary {
    background: transparent;
    color: var(--accent-primary);
    border: 2px solid var(--accent-primary);
}

.ldr-btn-outline-primary:hover {
    background: var(--accent-primary);
    color: white;
}

.ldr-btn-outline-success {
    background: transparent;
    color: var(--success-color);
    border: 2px solid var(--success-color);
}

.ldr-btn-outline-success:hover {
    background: var(--success-color);
    color: white;
}

.ldr-btn-outline-warning {
    background: transparent;
    color: var(--warning-color);
    border: 2px solid var(--warning-color);
}

.ldr-btn-outline-warning:hover {
    background: var(--warning-color);
    color: var(--bg-primary);
}

.ldr-active {
    background: var(--accent-primary) !important;
    color: white !important;
}

/* Embedding Settings Card - Optimized */
.ldr-embedding-settings-card {
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border-color);
}

.ldr-embedding-info h4 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 600;
}

.ldr-embedding-info .ldr-info-box {
    background: var(--bg-primary);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--accent-primary);
    margin-bottom: 15px;
}

.ldr-embedding-info .ldr-info-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.ldr-embedding-info .ldr-info-item:last-child {
    border-bottom: none;
}

.ldr-embedding-info .ldr-info-label {
    font-weight: 600;
    color: var(--text-secondary);
}

.ldr-embedding-info .ldr-info-value {
    color: var(--text-primary);
}

/* Performance Optimizations */
@media (prefers-reduced-motion: no-preference) {
    .ldr-btn-collections,
    .ldr-stat-card,
    .ldr-document-item {
        will-change: transform, box-shadow;
    }

    .ldr-progress-fill {
        will-change: width;
    }

    .ldr-btn-collections:not(:hover),
    .ldr-stat-card:not(:hover),
    .ldr-document-item:not(:hover) {
        will-change: auto;
    }
}

/* GPU acceleration for smooth animations */
.ldr-modal-content,
.ldr-btn-collections,
.ldr-stat-card {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Utility Classes for Common Patterns */
.ldr-flex-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.ldr-featured-section {
    background: linear-gradient(135deg, rgba(var(--accent-primary-rgb), 0.15) 0%, rgba(var(--accent-secondary-rgb), 0.15) 100%), var(--card-bg) !important;
    border: 2px solid var(--accent-primary);
}

.ldr-char-counter {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.ldr-content-padding {
    padding: 1rem;
}

.ldr-text-center-muted {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 1rem;
}

.ldr-link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 1rem 2rem;
}

.ldr-section-footer {
    margin-top: 2rem;
}

.ldr-hidden {
    display: none;
}

/* Guidelines styling */
.ldr-content-padding h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ldr-content-padding h3:first-child {
    margin-top: 0;
}

.ldr-content-padding h3 i {
    color: var(--accent-primary);
}

.ldr-content-padding ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1.5rem;
}

.ldr-content-padding li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-primary);
    line-height: 1.6;
}

.ldr-content-padding li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--accent-primary);
    font-weight: bold;
}

/* Info Text */
.ldr-info-text {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* Quick Tips Styling */
.ldr-quick-tips {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
}

.ldr-tip-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(var(--accent-primary-rgb), 0.1) 0%, rgba(var(--accent-secondary-rgb), 0.1) 100%);
    border-left: 3px solid var(--accent-primary);
    border-radius: 8px;
}

.ldr-tip-item i {
    color: var(--accent-primary);
    font-size: 1.25rem;
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.ldr-tip-item div {
    color: var(--text-primary);
    line-height: 1.6;
}

.ldr-tip-item strong {
    color: var(--accent-secondary);
}
