/**
 * CC Mitarbeiterverwaltung - Document Manager Styles
 */

/* Document Library */
.pc-document-library {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.pc-document-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    align-items: center;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.pc-document-filters input[type="text"],
.pc-document-filters select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    min-width: 200px;
}

.pc-document-filters input[type="text"]:focus,
.pc-document-filters select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.pc-document-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Document Cards */
.pc-document-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid #e9ecef;
}

.pc-document-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.pc-document-card h3 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
}

.pc-document-categories {
    margin-bottom: 10px;
}

.pc-category-tag {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    margin-right: 5px;
    margin-bottom: 5px;
}

.pc-document-tags {
    margin-bottom: 15px;
}

.pc-tag {
    display: inline-block;
    background: #e9ecef;
    color: #495057;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    margin-right: 5px;
    margin-bottom: 5px;
}

.pc-document-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 12px;
    color: #6c757d;
    flex-wrap: wrap;
    gap: 10px;
}

.pc-assigned-employee {
    background: #e3f2fd;
    color: #1976d2;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid #bbdefb;
}

.pc-document-files {
    margin-bottom: 15px;
}

.pc-document-file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 8px;
    transition: background-color 0.2s ease;
}

.pc-document-file:hover {
    background: #e9ecef;
}

.pc-file-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #495057;
    flex: 1;
}

.pc-file-link:hover {
    color: #667eea;
}

.pc-file-icon {
    margin-right: 8px;
    font-size: 16px;
}

.pc-file-name {
    font-weight: 500;
    margin-right: 8px;
}

.pc-file-size {
    color: #6c757d;
    font-size: 11px;
}

.pc-delete-file {
    background: #dc3545;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.pc-delete-file:hover {
    background: #c82333;
}

.pc-external-link {
    margin-top: 15px;
}

.pc-external-url {
    display: inline-block;
    background: #28a745;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.pc-external-url:hover {
    background: #218838;
    color: white;
    text-decoration: none;
}

/* Priority Badges */
.pc-priority-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.priority-niedrig .pc-priority-badge {
    background: #17a2b8;
    color: white;
}

.priority-normal .pc-priority-badge {
    background: #6c757d;
    color: white;
}

.priority-hoch .pc-priority-badge {
    background: #ffc107;
    color: #212529;
}

.priority-kritisch .pc-priority-badge {
    background: #dc3545;
    color: white;
}

.pc-expired-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #dc3545;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.pc-document-card.expired {
    border-color: #dc3545;
    background: #fff5f5;
}

/* Document Upload Form */
.pc-document-upload {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.pc-document-upload h3 {
    margin: 0 0 25px 0;
    color: #2c3e50;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
}

.pc-form-group {
    margin-bottom: 20px;
}

.pc-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
}

.pc-form-group input[type="text"],
.pc-form-group input[type="file"],
.pc-form-group select,
.pc-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.pc-form-group input[type="text"]:focus,
.pc-form-group select:focus,
.pc-form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.pc-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.pc-help-text {
    margin-top: 5px;
    font-size: 12px;
    color: #6c757d;
}

.pc-upload-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pc-upload-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.pc-upload-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Progress Bar */
.pc-progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.pc-progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s ease;
}

/* Document Search */
.pc-document-search {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
}

.pc-document-search h3 {
    margin: 0 0 25px 0;
    color: #2c3e50;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
}

.pc-search-form {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.pc-search-form input[type="text"],
.pc-search-form select {
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    min-width: 200px;
}

.pc-search-form input[type="text"]:focus,
.pc-search-form select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#cc-search-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#cc-search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Search Results */
#cc-search-results {
    margin-top: 30px;
}

.pc-search-result {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-left: 4px solid #667eea;
}

.pc-search-result h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 18px;
}

.pc-search-result p {
    margin: 0 0 10px 0;
    color: #6c757d;
    line-height: 1.5;
}

.pc-search-result-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #6c757d;
}

/* Admin Columns */
.pc-priority-niedrig {
    color: #17a2b8;
    font-weight: 600;
}

.pc-priority-normal {
    color: #6c757d;
    font-weight: 600;
}

.pc-priority-hoch {
    color: #ffc107;
    font-weight: 600;
}

.pc-priority-kritisch {
    color: #dc3545;
    font-weight: 600;
}

.expired {
    color: #dc3545;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .pc-document-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .pc-document-filters input[type="text"],
    .pc-document-filters select {
        min-width: auto;
    }
    
    .pc-document-grid {
        grid-template-columns: 1fr;
    }
    
    .pc-document-card {
        padding: 15px;
    }
    
    .pc-document-meta {
        flex-direction: column;
        gap: 5px;
    }
    
    .pc-search-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .pc-search-form input[type="text"],
    .pc-search-form select {
        min-width: auto;
    }
    
    .pc-document-upload {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .pc-document-library {
        padding: 10px;
    }
    
    .pc-document-filters {
        padding: 15px;
    }
    
    .pc-document-card {
        padding: 12px;
    }
    
    .pc-document-card h3 {
        font-size: 16px;
    }
    
    .pc-document-upload {
        padding: 15px;
    }
    
    .pc-document-upload h3 {
        font-size: 20px;
    }
}

/* Loading States */
.pc-loading {
    opacity: 0.6;
    pointer-events: none;
}

.pc-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Notifications */
.pc-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.pc-notification.show {
    transform: translateX(0);
}

.pc-notification.success {
    background: #28a745;
}

.pc-notification.error {
    background: #dc3545;
}

.pc-notification.info {
    background: #17a2b8;
}

/* Version History */
.pc-version-history {
    margin-top: 15px;
}

.pc-version-history h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #495057;
}

.pc-version-history ul {
    margin: 0;
    padding-left: 20px;
}

.pc-version-history li {
    margin-bottom: 5px;
    font-size: 12px;
    color: #6c757d;
}

/* File Upload Preview */
.pc-file-preview {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 8px;
}

.pc-file-preview .pc-file-icon {
    margin-right: 8px;
    font-size: 16px;
}

.pc-file-preview .pc-file-name {
    flex: 1;
    font-weight: 500;
}

.pc-file-preview .pc-file-size {
    color: #6c757d;
    font-size: 11px;
    margin-left: 8px;
}

.pc-file-preview .pc-remove-file {
    background: #dc3545;
    color: white;
    border: none;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    cursor: pointer;
    margin-left: 8px;
}

.pc-file-preview .pc-remove-file:hover {
    background: #c82333;
}
