/* Individual Document Page Styling */
.ldr-document-details-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Document Header Section */
.ldr-document-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideDown 0.6s ease-out;
}

.ldr-document-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 20px 0 15px 0;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 15px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ldr-document-title i {
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ldr-document-subtitle {
    font-size: 1.2rem;
    color: #718096;
    margin-bottom: 25px;
    font-style: italic;
}

.ldr-authors-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ldr-authors-list li {
    background: linear-gradient(135deg, #edf2f7, #e2e8f0);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #4a5568;
    font-weight: 500;
}

.ldr-authors-list li:not(:last-child):after {
    content: "";
    display: none;
}

/* Document Actions */
.ldr-document-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 25px;
}

.ldr-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.ldr-btn:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.ldr-btn-primary {
    background: linear-gradient(135deg, #4299e1, #3182ce);
    color: white;
}

.ldr-btn-primary:hover {
    background: linear-gradient(135deg, #3182ce, #2c5282);
    box-shadow: 0 8px 25px rgba(66, 153, 225, 0.3);
}

.ldr-btn-secondary {
    background: linear-gradient(135deg, #a0aec0, #718096);
    color: white;
}

.ldr-btn-secondary:hover {
    background: linear-gradient(135deg, #718096, #4a5568);
    box-shadow: 0 8px 25px rgba(160, 174, 192, 0.3);
}

.ldr-btn-success {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
}

.ldr-btn-success:hover {
    background: linear-gradient(135deg, #38a169, #2f855a);
    box-shadow: 0 8px 25px rgba(72, 187, 120, 0.3);
}

.ldr-btn-danger {
    background: linear-gradient(135deg, #f56565, #e53e3e);
    color: white;
}

.ldr-btn-danger:hover {
    background: linear-gradient(135deg, #e53e3e, #c53030);
    box-shadow: 0 8px 25px rgba(245, 101, 101, 0.3);
}

.ldr-btn-info {
    background: linear-gradient(135deg, #4299e1, #3182ce);
    color: white;
}

.ldr-btn-info:hover {
    background: linear-gradient(135deg, #3182ce, #2c5282);
    box-shadow: 0 8px 25px rgba(66, 153, 225, 0.3);
}

/* Metadata Sections */
.ldr-metadata-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: fadeInUp 0.8s ease-out;
}

.ldr-metadata-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

.ldr-metadata-section h2 i {
    color: #667eea;
    font-size: 1.3rem;
}

.ldr-metadata-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.ldr-metadata-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 15px;
    background: linear-gradient(135deg, #f7fafc, #edf2f7);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: border-color 0.3s ease;
}

.ldr-metadata-item:hover {
    border-color: #cbd5e0;
}

.ldr-metadata-label {
    font-weight: 600;
    color: #718096;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.ldr-metadata-value {
    color: #2d3748;
    font-size: 1rem;
    word-break: break-word;
    font-weight: 500;
}

.ldr-metadata-value code {
    background: #2d3748;
    color: #f7fafc;
    padding: 4px 8px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.ldr-metadata-value a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.ldr-metadata-value a:hover {
    color: #5a67d8;
    text-decoration: underline;
}

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

.ldr-badge-success {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
}

.ldr-badge-info {
    background: linear-gradient(135deg, #4299e1, #3182ce);
    color: white;
    box-shadow: 0 4px 15px rgba(66, 153, 225, 0.3);
}

.ldr-badge-warning {
    background: linear-gradient(135deg, #ed8936, #dd6b20);
    color: white;
    box-shadow: 0 4px 15px rgba(237, 137, 54, 0.3);
}

/* RAG Status */
.ldr-rag-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #f7fafc, #edf2f7);
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.ldr-rag-status i {
    font-size: 1.2rem;
}

.ldr-rag-status span {
    font-weight: 500;
    color: #2d3748;
}

/* Empty Value Styling */
.ldr-empty-value {
    color: #a0aec0;
    font-style: italic;
    font-size: 0.9rem;
}

/* Content Preview */
.ldr-content-preview {
    background: linear-gradient(135deg, #2d3748, #1a202c);
    color: #f7fafc;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #667eea;
    white-space: pre-wrap;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    max-height: 400px;
    overflow-y: auto;
    margin-top: 15px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
}

.ldr-content-preview::-webkit-scrollbar {
    width: 8px;
}

.ldr-content-preview::-webkit-scrollbar-track {
    background: #4a5568;
    border-radius: 10px;
}

.ldr-content-preview::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 10px;
}

/* Source URL Section */
.ldr-metadata-section .ldr-metadata-value {
    background: linear-gradient(135deg, #f7fafc, #edf2f7);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    word-break: break-all;
}

/* 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);
    }
}

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

    .ldr-document-title {
        font-size: 2rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .ldr-document-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .ldr-btn {
        justify-content: center;
    }

    .ldr-metadata-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .ldr-authors-list {
        flex-direction: column;
        gap: 5px;
    }

    .ldr-authors-list li {
        align-self: flex-start;
    }
}

@media (max-width: 480px) {
    .ldr-document-header,
    .ldr-metadata-section {
        padding: 20px;
    }

    .ldr-document-title {
        font-size: 1.8rem;
    }

    .ldr-metadata-section h2 {
        font-size: 1.3rem;
    }
}

/* Dark Theme Support */
@media (prefers-color-scheme: dark) {
    .ldr-document-details-container {
        background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    }

    .ldr-document-header,
    .ldr-metadata-section {
        background: rgba(45, 55, 72, 0.95);
        color: #f7fafc;
    }

    .ldr-document-title {
        background: linear-gradient(135deg, #9f7aea, #667eea);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .ldr-document-subtitle {
        color: #cbd5e0;
    }

    .ldr-metadata-section h2 {
        color: #f7fafc;
        border-bottom-color: #4a5568;
    }

    .ldr-metadata-item {
        background: linear-gradient(135deg, #2d3748, #1a202c);
        border-color: #4a5568;
    }

    .ldr-metadata-label {
        color: #cbd5e0;
    }

    .ldr-metadata-value {
        color: #f7fafc;
    }

    .ldr-metadata-value code {
        background: #1a202c;
        color: #f7fafc;
        border: 1px solid #4a5568;
    }

    .ldr-rag-status {
        background: linear-gradient(135deg, #2d3748, #1a202c);
        border-color: #4a5568;
    }

    .ldr-rag-status span {
        color: #f7fafc;
    }

    .ldr-empty-value {
        color: #718096;
    }

    .ldr-authors-list li {
        background: linear-gradient(135deg, #4a5568, #2d3748);
        color: #cbd5e0;
    }

    .ldr-metadata-section .ldr-metadata-value {
        background: linear-gradient(135deg, #2d3748, #1a202c);
        border-color: #4a5568;
    }
}
