/* Document Library Container Styles */

.doc-library-container {
    position: relative;
    margin: 20px 0;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.doc-library-container.doc-library-editable {
    border-color: #0073aa;
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.15);
}

.doc-library-header {
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    padding: 12px 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.doc-library-edit-button {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff !important;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.doc-library-edit-button:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #fff !important;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.doc-library-edit-button:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.doc-library-edit-button::before {
    content: "✏️";
    margin-right: 6px;
    font-size: 12px;
}

.doc-library-content {
    padding: 0;
    background: #fff;
}

/* Ensure the document display integrates well with the container */
.doc-library-content .filebird-docs-container {
    margin: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.doc-library-content .filebird-docs-container:first-child {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.doc-library-content .filebird-docs-container:last-child {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

/* Add subtle visual indicator for editable libraries */
.doc-library-container.doc-library-editable::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0073aa 0%, #005a87 50%, #0073aa 100%);
    z-index: 1;
}

/* Legacy styles for backward compatibility */
.doc-library-editor-controls {
    margin-bottom: 20px;
    padding: 10px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    text-align: center;
}

/* Error styling */
.doc-library-error {
    padding: 15px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    color: #721c24;
    margin: 10px 0;
}

/* Responsive design */
@media (max-width: 768px) {
    .doc-library-container {
        margin: 15px 0;
        border-radius: 6px;
    }
    
    .doc-library-header {
        padding: 10px 15px;
    }
    
    .doc-library-edit-button {
        padding: 5px 10px;
        font-size: 12px;
    }
    
    .doc-library-edit-button::before {
        font-size: 11px;
        margin-right: 4px;
    }
    
    /* Legacy styles */
    .doc-library-editor-controls {
        margin-bottom: 15px;
        padding: 8px;
    }
}

/* Document Library Usage Styles */
.document-library-usage {
    margin: 10px 0;
}

.usage-list {
    margin: 10px 0;
    padding: 0;
    list-style: none;
}

.usage-list li {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    gap: 10px;
}

.usage-list li:last-child {
    border-bottom: none;
}

.usage-type {
    background: #0073aa;
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    min-width: 40px;
    text-align: center;
}

.usage-title {
    flex: 1;
    font-weight: 500;
    text-decoration: none;
    color: #0073aa;
}

.usage-title:hover {
    color: #005a87;
    text-decoration: underline;
}

.usage-view {
    font-size: 12px;
    color: #666;
    text-decoration: none;
    padding: 2px 6px;
    border: 1px solid #ddd;
    border-radius: 3px;
    background: #f9f9f9;
}

.usage-view:hover {
    background: #f0f0f0;
    color: #333;
}

.no-usage {
    color: #666;
    font-style: italic;
    margin: 10px 0;
}

.usage-last-scan {
    margin-top: 10px;
    color: #666;
    font-size: 12px;
}

.usage-actions {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

#scan-status {
    margin-left: 10px;
    color: #666;
    font-size: 12px;
}

#scan-status .spinner {
    margin-right: 5px;
} 