.view-toggle-container {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 20px;
    padding: 10px 0;
}

.view-toggle-label {
    margin-right: 10px;
    font-size: 14px;
    color: #666;
}

.view-toggle-button {
    background: #f5f5f5;
    border: 1px solid #ddd;
    padding: 5px 10px;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
}

.view-toggle-button:first-of-type {
    border-radius: 3px 0 0 3px;
}

.view-toggle-button:last-of-type {
    border-radius: 0 3px 3px 0;
}

.view-toggle-button.active {
    background: #007cba;
    color: white;
    border-color: #006ba1;
}

.view-toggle-button:hover:not(.active) {
    background: #e9e9e9;
}

/* Single Query Loop CSS Transformations */
/* Default Grid View */
.gb-post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

/* List View Transformation */
body.archive-view-list .gb-post-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

body.archive-view-grid .plant-description {
    display: none;
}

body.archive-view-list .gb-post-grid .gb-block-post {
    display: flex;
    flex-direction: row;
    gap: 20px;
}

body.archive-view-list .gb-post-grid .gb-block-post .gb-featured-image {
    flex: 0 0 30%;
    margin: 0;
}

body.archive-view-list .gb-post-grid .gb-block-post .gb-post-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

body.archive-view-list .gb-post-grid .gb-block-post h2 {
    margin-top: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .gb-post-grid {
        grid-template-columns: 1fr;
    }

    body.archive-view-list .gb-post-grid .gb-block-post {
        flex-direction: column;
    }

    body.archive-view-list .gb-post-grid .gb-block-post .gb-featured-image {
        flex: 0 0 100%;
    }
}
