.fakta-postcat {
    width: 100%;
    margin: 0 0 0px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}


.fakta-postcat__row {
    display: flex;
    flex-wrap: nowrap;
    gap: 15px;
    width: 100%;
}

.fakta-postcat__button {
    flex: 1 1 auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    gap: 10px;
    padding: 12px 12px;
    background: #f4f4f4;
    border: 0px solid #e0e0e0;
    border-radius: 99px; /* updated radius */
    text-decoration: none !important;
    color: #333;
    transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
    min-width: 0;
}

.fakta-postcat__button:hover,
.fakta-postcat__button:focus {
    box-shadow: 0 0px 0px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
    background: #e3e3e3;
    color: #333; /* keep text color on hover */
}

.fakta-postcat__button:hover .fakta-postcat__label,
.fakta-postcat__button:focus .fakta-postcat__label {
    color: #333; /* ensure label stays #333 on hover */
}

.fakta-postcat__button.active {
    background: #555 !important;
    color: #fff;
    border-color: #fff;
}

.fakta-postcat__button.active .fakta-postcat__icon,
.fakta-postcat__button.active .fakta-postcat__label,
.fakta-postcat__button.active .fakta-postcat__count {
    color: #fff;
}

/* Specific background for dashicon when button is active */
.fakta-postcat__button.active .fakta-postcat__icon.dashicons {
    background: #777;
}

.fakta-postcat__icon {
    line-height: 1.9;
    width: 30px;
    height: 30px;
    font-size: 15px;
    background: #ccc;
    border-radius: 999px;
    flex-shrink: 0;
}

/* Ensure dashicon inherits the same styling */
.fakta-postcat__icon.dashicons {
    line-height: 1.9;
    width: 30px;
    height: 30px;
    font-size: 15px;
    background: #ccc;
    border-radius: 999px;
}

.fakta-postcat__text {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    flex: 1;
    justify-content: center;
}

.fakta-postcat__label {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    word-break: break-word;
    color: #333; /* ensure default color */
}

/* Smaller font for buttons without icon */
.fakta-postcat__button.no-icon .fakta-postcat__label {
    font-size: 13px;
}
.fakta-postcat__button.no-icon .fakta-postcat__count {
    font-size: 11px;
}

/* No‑icon button specific style */
.fakta-postcat__button.no-icon {
    padding: 5px 10px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 5px;
}

.fakta-postcat__count {
    font-size: 12px;
    font-weight: 400;
    color: #777;
    line-height: 1.2;
    color: inherit;
}

@media (max-width: 768px) {
    .fakta-postcat__row {
        flex-wrap: wrap;
    }

    .fakta-postcat__button {
        flex: 1 1 calc(50% - 12px);
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    .fakta-postcat__button {
        flex: 1 1 100%;
    }
}
