/* ============================================
   DOCUMENT CARD COMPONENTS (SHARED)
   Unified styling for document displays across Archive and Om Oss sections
   Single Source of Truth for document item layout
   ============================================ */

/* ===== TWO-COLUMN GRID LAYOUT ===== */

/* Generic two-column responsive grid */
.two-column-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 768px) {
    .two-column-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Column wrapper */
.document-column {
    display: flex;
    flex-direction: column;
}

/* Section titles inside columns should have no extra top margin */
.two-column-grid .document-column > .section-title:first-child {
    margin-top: 0;
}

/* ===== DOCUMENT LIST CONTAINER ===== */

/* White card container for document lists */
.document-list {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-top: 15px;
}

/* ===== DOCUMENT ITEM ===== */

/* Individual document item */
.document-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    transition: all 0.2s;
}

.document-item:hover {
    background: #f9fafb;
}

.document-item:last-child {
    border-bottom: none;
}

/* Document info section (icon + name) */
.document-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

/* Document file type icon */
.document-icon {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

/* PDF files - Red */
.document-icon.pdf {
    background: #ef4444;
}

/* Word files - Blue */
.document-icon.word {
    background: #3b82f6;
}

/* Document name/title */
.document-name {
    font-size: 14px;
    color: #1a2b5f;
    font-weight: 500;
}

/* Document actions (buttons) */
.document-actions {
    display: flex;
    gap: 8px;
}

.document-actions button {
    padding: 6px 16px;
    font-size: 13px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.document-actions .btn-download {
    background: #3b82f6;
    color: white;
}

.document-actions .btn-download:hover {
    background: #2563eb;
}

.document-actions .btn-edit {
    background: #3b82f6;
    color: white;
}

.document-actions .btn-edit:hover {
    background: #2563eb;
}

.document-actions .btn-delete {
    background: #ef4444;
    color: white;
}

.document-actions .btn-delete:hover {
    background: #dc2626;
}

/* ===== COLLAPSIBLE ARCHIVE SECTION ===== */

/* Archive collapsible container */
.archive-collapsible {
    background: white;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-top: 15px;
}

/* Archive toggle header */
.archive-toggle-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    background: white;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
    font-size: 14px;
    font-weight: 600;
    color: #1a2b5f;
    border-bottom: 1px solid #e5e7eb;
}

.archive-toggle-header:hover {
    background: #f9fafb;
}

/* Archive arrow indicator */
.archive-arrow {
    display: inline-block;
    transition: transform 0.3s ease;
    font-size: 12px;
    color: #666;
}

.archive-arrow.expanded {
    transform: rotate(90deg);
}

/* Archive collapsible content */
.archive-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.archive-content.expanded {
    max-height: 2000px;
}

/* Slimmer styling for archive items */
.archive-content .document-item {
    padding: 8px 16px;
    background: white;
}

.archive-content .document-item:hover {
    background: #f9fafb;
}

.archive-content .document-icon {
    width: 32px;
    height: 32px;
    font-size: 10px;
}

.archive-content .document-name {
    font-size: 13px;
}

.archive-content .document-actions button {
    padding: 4px 12px;
    font-size: 12px;
}

/* ===== EMPTY STATE ===== */

/* Empty state for document lists */
.document-empty-state {
    padding: 20px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
    background: #f9fafb;
    border-radius: 8px;
    margin-top: 10px;
    margin-bottom: 10px;
}

/* Small add button for empty states */
.btn-add-small {
    background: var(--color-accent-primary);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-block;
    margin-top: 5px;
}

.btn-add-small:hover {
    background: var(--color-accent-primary-hover);
    transform: translateY(-1px);
}

.btn-add-small:active {
    transform: translateY(0);
}

/* ===== MOBILE RESPONSIVE ===== */

@media (max-width: 767px) {
    .document-item {
        padding: 10px 15px;
    }
    
    .document-icon {
        width: 36px;
        height: 36px;
        font-size: 11px;
    }
    
    .document-name {
        font-size: 13px;
    }
    
    .document-actions button {
        padding: 5px 12px;
        font-size: 12px;
    }
    
    .archive-toggle-header {
        padding: 12px 15px;
        font-size: 13px;
    }
    
    .archive-content .document-item {
        padding: 6px 12px;
    }
    
    .archive-content .document-icon {
        width: 28px;
        height: 28px;
        font-size: 9px;
    }
    
    .archive-content .document-name {
        font-size: 12px;
    }
}
