/* Media View Toggle Styles */

/* Header Layout */
.fileListHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.results-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* View Toggle Buttons */
.view-toggle {
    display: flex;
    gap: 5px;
    background: #f5f5f5;
    border-radius: 6px;
    padding: 4px;
}

.view-btn {
    background: transparent;
    border: none;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    color: #666;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-btn:hover {
    background: #e0e0e0;
    color: var(--brand-main, #009fe3);
}

.view-btn.active {
    background: var(--brand-main, #009fe3);
    color: white;
}

.view-btn svg {
    width: 16px;
    height: 16px;
}

/* Grid View (3 columns) */
.posts-grid.grid-view {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    list-style: none;
    padding: 0;
}

.posts-grid.grid-view .post-item {
    display: block;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.posts-grid.grid-view .post-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

/* List View */
.posts-grid.list-view {
    display: block;
    list-style: none;
    padding: 0;
}

.posts-grid.list-view .post-item {
    display: block;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.2s ease;
}

.posts-grid.list-view .post-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-color: var(--brand-main, #009fe3);
}

/* Default view (fallback to grid) */
#filelistWrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    list-style: none;
    padding: 0;
}

#filelistWrapper .listtemsingle {
    display: block;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Responsive Design */
@media (max-width: 992px) {
    #filelistWrapper.grid-view {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 768px) {
    #filelistWrapper.grid-view {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .fileListHeader {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .results-info {
        align-self: flex-end;
    }
}

/* Post content styling within grid/list items */
.listtemsingle h3,
.listtemsingle h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--brand-dark, #002d57);
}

.listtemsingle p {
    margin-bottom: 10px;
    line-height: 1.5;
}

.listtemsingle a {
    color: var(--brand-main, #009fe3);
    text-decoration: none;
}

.listtemsingle a:hover {
    text-decoration: underline;
}
